Hello,
I am using mkspline to derive a cost function for per capita
expenditure in a certain subset of my data, let's call it subset "A".
I then want to use the results from that regression to estimate values
for a completely different subset. Usually I can simply regress on the
variables in question and then specify predict XYZ. However, since
mkspline creates a series of variables only for subset "A", I can't
create predictions for the second subset. Any suggestions?
Code is below:
"mkspline PCspline_pop=ev_pop if dataset=="Original", cubic displayknots"
"xi: regressPCEXP `log'PCspline_pop* i.fips if dataset=="Original",
vce(cluster fips)"
"predict PCEXP_spline"
Tal Elmatad
Senior Research Assistant
Federal Reserve Bank of Boston
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/