Page 1 of 1

Generate series, set initial value

Posted: Sun Jun 17, 2012 5:21 pm
by at-dc
I would like to generate a new series defined as

newvariable = oldvariable + newvariable(-1)

setting the first value of newvariable as x=1. [newvariable(-1) is a first order lag of the series being generated.]

Does anyone know how to do this?

Thanks!

Generate series, set initial value

Posted: Sun Jun 17, 2012 8:40 pm
by EViews Gareth

Code: Select all

Smpl @first @first Series newvariable=1 smpl @first+1 @last Newvariable = oldvariable + newvariable(-1)

Re: Generate series, set initial value

Posted: Mon Jun 18, 2012 4:13 am
by at-dc
Thank you very much

Re: Generate series, set initial value

Posted: Sat Oct 27, 2012 11:15 pm
by FASTONE
what do this commands??
in particular the lines:
smpl @first+1 !nobs+200
series y1 = y1(-1)+nrnd
series dy1 = y1 - y1(-1)
smpl @first+200 !nobs+200
equation eq1.ls dy1 y1(-1)

!nreps = 50000
!nobs = 1000
for !repc=1 to !nreps
smpl @first @first
series y1 = 0
smpl @first+1 !nobs+200
series y1 = y1(-1)+nrnd
series dy1 = y1 - y1(-1)
smpl @first+200 !nobs+200
equation eq1.ls dy1 y1(-1)
t1(!repc)=@tstats(1)
equation eq2.ls dy1 c y1(-1)
t2(!repc)=@tstats(2)
equation eq3.ls dy1 c @trend y1(-1)
t3(!repc)=@tstats(3)
next
smpl @first !nreps
k1=@quantile(t1,0.01)
k2=@quantile(t1,0.05)
k3=@quantile(t1,0.1)
k4=@quantile(t2,0.01)
k5=@quantile(t2,0.05)
k6=@quantile(t2,0.1)
k7=@quantile(t3,0.01)
k8=@quantile(t3,0.05)
k9=@quantile(t3,0.1)

Re: Generate series, set initial value

Posted: Mon Oct 29, 2012 7:49 am
by EViews Gareth
I'm not sure I understand what you're asking.

If you're asking us to explain what every single one of those commands does, I think we'll simply refer you to the Command and Programming Reference, and the Object Reference, where you can look them up :)