Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Scoring a Fixed Effects Model on another dataset


From   William Sankey <[email protected]>
To   [email protected]
Subject   st: Scoring a Fixed Effects Model on another dataset
Date   Wed, 12 Jun 2013 15:31:28 -0400

Hi Statalist,

I have two samples of the same data, my TEST_SAMPLE and
VALIDATION_SAMPLE. I want to run a fixed effects model on my
TEST_SAMPLE and collect the parameter estimates and apply them to the
VALIDATION_SAMPLE. I believe I want to use the predict score command.
After applying these coefficients to the VALIDATION_SAMPLE we want to
compute the predicted value of my dependent variable as to compute the
error.

So far I believe I am on the right track with the following code:

use TEST_SAMPLE
xtset PROVIDER
xtreg MARGIN {independent variables}, fe

use VALIDATION_SAMPLE
predict score

At this point I'm not sure how to retrieve predicted values of the
dependent variable to compute error. Also, if others have experience
with this kind of procedure and used a different method they would
recommend, I would appreciate it.

Any insight would be greatly appreciated.

Best,
Will
--
William J. Sankey
Johns Hopkins University
MA Public Policy '12
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index