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
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Generate series, set initial value
Code: Select all
Smpl @first @first
Series newvariable=1
smpl @first+1 @last
Newvariable = oldvariable + newvariable(-1)
Re: Generate series, set initial value
Thank you very much
Re: Generate series, set initial value
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)
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)
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Generate series, set initial value
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 :)
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 :)
Who is online
Users browsing this forum: No registered users and 2 guests
