I have a time-series A, and I want to get the average and st-deviation of series A to calculate a new series Z-A with z-values of series A. How do I do it in Eviews?
This is what I wanna do:
Z_A(i)=[A(i) - average(A)] / standard deviation (A)
or simply
Z_A = [A - average (A)] / standard deviation (A)
Can you advise how to generate such series in Eviews? I know I can do it in Excel, but I want to automatize this in eviews.
Standard Deviation, Average, and Z-Values
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Re: Standard Deviation, Average, and Z-Values
You can easily find EViews counterpart of these functions. Simply look up descriptive statistics in the users guide.
Re: Standard Deviation, Average, and Z-Values
I do know that I can find these stats in descriptive statistics of the series. But I am not going to do descriptive statistics, and the write the figures for average and st. deviation on a paper, and then generate the series by rewriting these stats into the formula from the paper. I have to do do this frequenlty for large number of series.
I want to generate the series automatically with these properties:
Z_A = [A - average (A)] / standard deviation (A)
Is it possible to do it in Eviews?
I want to generate the series automatically with these properties:
Z_A = [A - average (A)] / standard deviation (A)
Is it possible to do it in Eviews?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Standard Deviation, Average, and Z-Values
Code: Select all
series z = (a-@mean(a))/@stdev(a)
Re: Standard Deviation, Average, and Z-Values
Gareth, thanks this works perfect. I need to run the colde below every week or month for a number of series in the same exact format. Is there a simple way how to automatize the update? The way I imagine this could work is that I would write something like "run z_update" and it runs the code below, without me having to type it each time.
Code: Select all
series z_a = (a-@mean(a))/@stdev(a)
series z_b = (b-@mean(b))/@stdev(b)
series z_c = (c-@mean(c))/@stdev(c)
series z_d = (d-@mean(d))/@stdev(d)
series z_e = (e-@mean(e))/@stdev(e)
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Standard Deviation, Average, and Z-Values
Create an EViews program and put it in that. File->New->Program.
Who is online
Users browsing this forum: No registered users and 2 guests
