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]

Re: st: re-using estimates from previously estimated models and related issues


From   Cameron McIntosh <cnm100@hotmail.com>
To   STATA LIST <statalist@hsphsun2.harvard.edu>
Subject   Re: st: re-using estimates from previously estimated models and related issues
Date   Fri, 4 Nov 2011 16:20:31 -0400

It would help substantially to explain the ultimate purpose of this exercise... and an added bonus in that case is that one often finds out that the initial game plan is suboptimal, with superior ones being recommended. :)Cam

> > From: vitorino@wharton.upenn.edu
> > To: statalist@hsphsun2.harvard.edu
> > Subject: st: re-using estimates from previously estimated models and related issues
> > Date: Fri, 4 Nov 2011 11:41:02 -0400
> >
> > Dear Statalist members:
> >
> > I would like to run several regressions and save their estimates and
> > predicted values so that they can be used as inputs for some
> > calculations that will be done later in the code. I would like to do
> > this in the most efficient and flexible way possible...
> >
> > For simplicity let's assume this is the sequence of the things I need
> > to calculate:
> >
> > 1st stage
> >
> > logit y x1 x2
> > logit y x1 x3 x4
> > logit y x1 x4
> >
> > 2nd stage
> >
> > For each of the models above:
> >
> > gen totprob=sum(predicteprobs)
> > gen probx1= [coefficient for variable x1 ] * totprob
> > gen probx2= [coefficient for variable x2 ] * totprob
> > gen probx3= [coefficient for variable x3 ] * totprob
> >
> >
> > My questions are the following:
> > -Is it best to collect the estimates and predicted probs in a matrix
> > or in a data file?
> > -How to deal with the problem that I may have 3 model specifications
> > now but I may want to add (or remove) some specifications later? (i.e.
> > the number of model specifications is not always the same in different
> > runs of the do file)?
> > -How to deal with the fact that, in the second stage, some of the
> > values may not exist for some models (for example, there is no
> > coefficient for x2 in model specification 3 from the first stage)? (If
> > the coefficient was not estimated in a given model I would like Stata
> > not to calculate probx2)
> >
> >
> > Any suggestions are appreciated.
> > Thanks!
> > Ana
> > *
> > * 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/
>
 		 	   		  
*
*   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