standard deviation of group

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

Sima77
Posts: 23
Joined: Sat May 01, 2021 10:07 am

standard deviation of group

Postby Sima77 » Fri Mar 31, 2023 6:01 am

I constructed a group (g) of multiple time series that include the residuals of the model using daily data for a 10 years period of time. The second step, I want to compute the monthly standard deviation of each time series of this group (g). I used @stdevsby (g, @month), eviews computed 12 monthly standard deviations but they are the same for the 10 years. I want 12 standard deviations for each year, but this code repeated the same 12 standard deviations througout the 10 years. I would really appreciate if I received help on this.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: standard deviation of group

Postby EViews Gareth » Fri Mar 31, 2023 8:52 am

Instead of @month use @datefloor(@date, "mon")
Follow us on Twitter @IHSEViews

Sima77
Posts: 23
Joined: Sat May 01, 2021 10:07 am

Re: standard deviation of group

Postby Sima77 » Fri Mar 31, 2023 10:48 am

Thank you so much, It works now.

Sima77
Posts: 23
Joined: Sat May 01, 2021 10:07 am

Re: standard deviation of group

Postby Sima77 » Tue Apr 04, 2023 9:02 am

I tried to figure out what are the 12 standard deviation values I got when I used @month, but I couldn't. I would really appreciate it if you let me know what are these 12 standard deviation values? are they the monthly averages or something else?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: standard deviation of group

Postby EViews Gareth » Tue Apr 04, 2023 9:31 am

@month is just the month of the year.
Follow us on Twitter @IHSEViews

Sima77
Posts: 23
Joined: Sat May 01, 2021 10:07 am

Re: standard deviation of group

Postby Sima77 » Tue Apr 04, 2023 11:23 am

Sorry I did not get it. I did not understand why when I used @month I got the same monthly standard deviation values for the 10 years?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: standard deviation of group

Postby EViews Gareth » Tue Apr 04, 2023 1:25 pm

Because January is January. When you use @month, it just treats every date in January as the same dataset - it doesn't split by year.
Follow us on Twitter @IHSEViews

Sima77
Posts: 23
Joined: Sat May 01, 2021 10:07 am

Re: standard deviation of group

Postby Sima77 » Tue Apr 04, 2023 3:30 pm

Now I got it. Makes sense. Thank you so much.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 30 guests