Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: Using Levprdict to predict values of second dataset


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Using Levprdict to predict values of second dataset
Date   Wed, 14 Mar 2012 15:06:06 +0000

-levpredict- (SSC; Kit Baum) is a user-written command. Note difference of spelling. Please remember that you are asked to explain the provenance of any such command you refer to. 

There are other solutions to this problem, notably -glm, link(log)- which does everything in one step for you and thus eliminates the need for any fix-up program. 

Nick 
n.j.cox@durham.ac.uk 

NEPPC RA

I am using a regression to estimate log(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 X. However, since it is
logged I am using levpredict to reduce transformation bias. I noticed
that levpredict is only creating estimates for the observations used
in the regression. Thus, it is skipping the second subset for which I
am trying to estimate costs. Any suggestions?

(As a note this is a similar issue as to the one I am having with
splines, but I will be testing out the suggestion of another statalist
user later today to address that issue.)

*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index