ANALYZE

<< Click to Display Table of Contents >>

Navigation:  Gekko User Manual > Gekko statements >

ANALYZE

Previous pageReturn to chapter overviewNext page

ANALYZE calculates statistics on one or more timeseries or timeseries expressions.

 

For each expression, Gekko prints out mean, standard deviation, and min and max values. In addition, cross-correlations are computed if there are more than one expression, and the cross-correlations is put into the matrix #corr.

 


 

Syntax

 

analyze <period> variables;

 

period

(Optional). Local period, for instance 2010 2020, 2010q1 2020q4 or %per1 %per2+1.

variables

A list of variables (timeseries expressions)

 

If no period is given inside the <...> angle brackets, the global period is used (cf. TIME).

If a variable without databank indication is not found in the first-position databank, Gekko will look for it in other open databanks if databank search is active (cf. MODE).

 


 

Examples

 

Analyze the growth rate of the three variables x, y, z:

 

time 2001 2005;
= 1.3, 1.2, 1.3, 1.4, 1.2;
= 1.2, 1.4, 1.7, 1.6, 1.5;
= 1.6, 1.4, 1.2, 1.3, 1.4;
analyze <2002 2005> pch(x), pch(y), pch(z);
 
//pch(x)
//  4 observations from 2002 to 2005
//  Mean    =          -1.4881
//  St.dev. =          11.2991
//  Min     =         -14.2857 in 2005
//  Max     =           8.3333 in 2003
//pch(y)
//  4 observations from 2002 to 2005
//  Mean    =           6.4907
//  St.dev. =          14.6300
//  Min     =          -6.2500 in 2005
//  Max     =          21.4286 in 2003
//pch(z)
//  4 observations from 2002 to 2005
//  Mean    =          -2.6900
//  St.dev. =          12.3828
//  Min     =         -14.2857 in 2003
//  Max     =           8.3333 in 2004
//
//Cross correlation based on 3 variables and 4 observations
//
//#corr
//                   1              2              3 
//    1         1.0000         0.2683        -0.2018 
//    2         0.2683         1.0000        -0.9967 
//    3        -0.2018        -0.9967         1.0000 

 

 


 

Note

 

The cross-correlations are computed as Pearson product-moment correlation coefficients.

 

If you square the cross-correlation matrix (prt multiply(#corr, #corr);), these squared values correspond to the R2 values you obtain by pairwise linear regression between the variables, for instance ols x2 = x1;.

 


 

Related statements

 

OLS