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

# re: st: changing estimated parameters for new prediction

 From Christopher Baum To Subject re: st: changing estimated parameters for new prediction Date Sun, 31 Oct 2010 20:39:59 -0400

```<>
Mike said

How do I take old coefficients from the first run, apply those to the
data after setting one of the coefficients equal to zero, and
reestimate the model to obtain a new y_hat?

The steps I believe I need to take are something like this:

1) logit dep_var ind_var1 ind_var2 ind_var3
2) predict dep_var_hat
3) (a line here to set the ind_var3 coefficient to zero)?
4) (a line here to run the data through the new parameters, the only
change being the ind_var3 parameter set to zero)?
5) predict dep_var_hat2

Please let me know if you know how to do steps 3 and 4 or if there is
an altogether easier way to do this.

It is not clear what you are trying to do. When you say 'reestimate the model to obtain a new y_hat", it suggests
that step 3 and 4 can be achieved by doing
logit dep_var ind_var1 ind_var2
That is, just take ind_var3 out of the model and reestimate, and generate predictions.

But if you mean you want the predicted value with the term involving ind_var3 knocked out, given that you're working with a logit,

2a) predict double xb, xb
generate double xbadj = xb - _b[ind_var3]*ind_var3

Kit

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html

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