Hi!
I am using Eviews 7 and I have a question about the standard deviation function. I have a database for the period 1990Q1 to 2009Q2. I want to calculate an explanatory variable' standard deviation for the second half of my sample using the information of the first half; keeping the first observation fixed. So I want to compute it first for 1999Q4 using info from 1990Q1-1999Q3; then for 2000Q1 using info from 1990Q1-1999Q4 and so on until 2009Q2.
I have tried the programs detailed below however although it gives me information for the second half of the period (as I want to), it is calculating the standard deviation using the info. for the second half of the period instead of using the first half which is what I want.
How can I estimate the stdev for the second half of my sample using the information of the first half?
Thank you very much in advance!
!halfobs=39
!endobs=78
for !c = 1 to !halfobs
smpl @all
smpl @last-(!halfobs-!c) @last
series stdev=@stdev(a_rer_gq)
Standard deviation over recursive sample
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Standard deviation over recursive sample
Use the @cumstdev function. Something like:
Code: Select all
series temp = @cumstdev(a_rer_gq)
smpl 1999q4 @last
series stdev = temp(-1)
d temp
Re: Standard deviation over recursive sample
Thank you very much Gareth!
Who is online
Users browsing this forum: No registered users and 2 guests
