Page 1 of 1

Standard Deviation, Average, and Z-Values

Posted: Wed Jun 22, 2011 7:22 am
by jasmin
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.

Re: Standard Deviation, Average, and Z-Values

Posted: Wed Jun 22, 2011 7:26 am
by trubador
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

Posted: Wed Jun 22, 2011 7:38 am
by jasmin
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?

Re: Standard Deviation, Average, and Z-Values

Posted: Wed Jun 22, 2011 7:51 am
by EViews Gareth

Code: Select all

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

Re: Standard Deviation, Average, and Z-Values

Posted: Fri Jun 24, 2011 7:34 am
by jasmin
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)

Re: Standard Deviation, Average, and Z-Values

Posted: Fri Jun 24, 2011 8:04 am
by EViews Gareth
Create an EViews program and put it in that. File->New->Program.