[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Paulo Regis" <pauloregis.ar@googlemail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: 2 stage estimation with missing values |

Date |
Wed, 28 May 2008 20:30:11 +0100 |

Dear all, I am working with nonlinear lest squares and forecast. My boss wants to program everything to be able to use the procedure in a command style (i.e. I need to program it so he can use it tipying into the command line). However, I have some problems because of nonlinear least squares and missing values. I will simplify the problem as much as possible. Lets say my procedure has 2 steps. 1st step: To obtain the forecast for variable x. From the complete sample (size N), I use the first N1 observations to obtain the forecast at N1+1 and the actualize the sample for the following obervations. At the end, I have forecast for N1+1 to N. 2nd step: I use the forecast of x(t) one period ahead x^(t+1) in a regression to explain y(t). The relationship is nonlinear, so that y(t) = f[x(t), x^(t+1)]+e and I use nonlinear least squares to obtain the coefficients. The problem is in the second step I need to drop the missign values but I need them back afterwards to work with the full sample once more to perform new estimations. Summing up, what I need is to create a temporary database without the missing values for the second step and be able to recover teh original database at the end of the routine. There is any useful trick for programmers to do this? thank you in advanced Paulo * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: 2 stage estimation with missing values***From:*"Mentzakis, Emmanouil" <e.mentzakis@abdn.ac.uk>

- Prev by Date:
**RE: st: Odd behavior** - Next by Date:
**Re: st: Reshaping data** - Previous by thread:
**st: Reshaping data** - Next by thread:
**st: RE: 2 stage estimation with missing values** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |