Caroline,

 

If your original series is x, then

series y = x*zeromiss(x>0)

 

will give you a series with the positive x values and missing values corresponding to the negative x’s. For the NLS estimation, you can do Sample\Restrict, based on criterion… and use “ok(y)” as the criterion.

 

HTH,

 

PS

 


From: gretl-users-bounces@lists.wfu.edu [mailto:gretl-users-bounces@lists.wfu.edu] On Behalf Of Caro Landry
Sent: Wednesday, February 24, 2010 4:31 PM
To: gretl-users@lists.wfu.edu
Subject: [Gretl-users] Creating new series

 

Hi!


I haven't found any answer to this problem online, and so am hoping that someone can help me here.
I need to:
a) create a new series that comprises only the positive observation of a series
b) only use the observations for which the new series are not equal to 0 in a NLS

How would I go about that?

Thanks in advance for your help!

Caroline Landry