Statalist


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

st: RE: 2 stage estimation with missing values


From   "Mentzakis, Emmanouil" <[email protected]>
To   <[email protected]>
Subject   st: RE: 2 stage estimation with missing values
Date   Thu, 29 May 2008 11:31:10 +0100

Maybe -preserve- and-restore- could be of help.
 
Cheers
Manos

________________________________

From: [email protected] on behalf of Paulo Regis
Sent: Wed 5/28/2008 8:30 PM
To: [email protected]
Subject: st: 2 stage estimation with missing values



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/




The University of Aberdeen is a charity registered in Scotland, No SC013683.

<<winmail.dat>>




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