RATS 10.1
RATS 10.1

Instructions /

PSTATS Instruction

Home Page

← Previous Next →

PSTATS( options )  series start end

PSTATS (Panel STATS) computes analysis of variance tests for time or individual effects and decomposes the variance of a series for random effects estimators.

Parameters

series

Series for which you want to compute statistics

start,end

range to use, defaults to range of series

Description

PSTATS uses the following decomposition of \({u_{it}}\) (the series):

 

\({u_{it}} = {\varepsilon _i} + {\lambda _t} + {\eta _{it}}\)

      

\(\varepsilon\) is the individual effect, \(\lambda\) is the time effect and \(\eta\) the purely random effect. If you use the option EFFECTS=INDIV, the decomposition only includes the \(\varepsilon\) and \(\eta\) components. With EFFECTS=TIME, it only includes \(\lambda\) and \(\eta\). (Note: if a particular effect is weak, it is possible for the estimated variance of the component to be negative.)

Options

EFFECTS=[INDIVIDUAL]/TIME/BOTH

This indicates whether to allow for INDIVIDUAL effects, TIME effects or BOTH.

 

SMPL=Standard SMPL option [unused]

 

TESTS/[NOTESTS]

TESTS requests the calculation of F-tests (analysis of variance) for the effects. For EFFECTS=INDIVIDUAL or EFFECTS=TIME, these are just the one-factor analysis of variance tests. For EFFECTS=BOTH, these are two-factor tests with one observation per cell.

 

SPREAD/[NOSPREAD]

If you use SPREAD, PSTATS does a likelihood ratio test for equal variances across cross-sections.

 

GROUP=SERIES or FRML with values defining individuals

This is an alternative to a panel data setup for data. This defines the individuals. If you use GROUP, you can’t do any calculations which require identifying specific time periods (EFFECTS=TIME or EFFECTS=BOTH).

Variables Defined

%NGROUP

number of individuals/groups used in the computation (omits individuals/groups that contain no valid data) (INTEGER)

%VINDIV

variance of individual component (REAL)

%VRANDOM

variance of random component (REAL)

%VTIME

variance of time component (REAL)

Example

This is a variation on the code presented in the PANEL.RPF example program.

 

cal(panelobs=20) 1935

all 10//1954:1

open data grunfeld.dat

data(format=prn,org=cols)

linreg invest

# firmvalue cstock

pstats(tests,effects=both) %resids

preg(method=fixed) invest

# firmvalue cstock

pstats(tests,effects=time) %resids

pstats(spread) %resids

 

The first PSTATS tests the residuals from an OLS regression for time and individual effects, the second tests the residuals from a fixed effects regression for time effects. The third PSTATS tests for equal variances.

Sample Output

The output from the second and third PSTATS instructions above is:

 

Analysis of Variance for Series %RESIDS

Source Sum of Squares  Degrees   Mean Square   F-Statistic  Signif Level

TIME    55556.59368270      19   2924.03124646        1.125     0.329613

ERROR  467921.55370355     180   2599.56418724

TOTAL  523478.14738625     199

 

Test of Equal Variances for Series %RESIDS

Chi-Squared(9)=    281.229443 with Significance Level 0.00000000

Notes

If you use EFFECTS=BOTH, the analysis of variance table will include F-tests for individual effects, time effects and a joint test. Note that the individual effects test will not be the same as you would get with EFFECTS=INDIV (and similarly for the time effects test with EFFECTS=TIME), as it is testing for individual effects allowing for time effects, while with EFFECTS=INDIV, it is not conditional on time effects.

 


Copyright © 2025 Thomas A. Doan