Standard Deviation, Average, and Z-Values

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

jasmin
Posts: 19
Joined: Thu Jun 16, 2011 8:50 am

Standard Deviation, Average, and Z-Values

Postby jasmin » Wed Jun 22, 2011 7:22 am

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.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Standard Deviation, Average, and Z-Values

Postby trubador » Wed Jun 22, 2011 7:26 am

You can easily find EViews counterpart of these functions. Simply look up descriptive statistics in the users guide.

jasmin
Posts: 19
Joined: Thu Jun 16, 2011 8:50 am

Re: Standard Deviation, Average, and Z-Values

Postby jasmin » Wed Jun 22, 2011 7:38 am

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?

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

Postby EViews Gareth » Wed Jun 22, 2011 7:51 am

Code: Select all

series z = (a-@mean(a))/@stdev(a)

jasmin
Posts: 19
Joined: Thu Jun 16, 2011 8:50 am

Re: Standard Deviation, Average, and Z-Values

Postby jasmin » Fri Jun 24, 2011 7:34 am

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

Postby EViews Gareth » Fri Jun 24, 2011 8:04 am

Create an EViews program and put it in that. File->New->Program.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests