Estimates the parameters of the pooled time-series cross-section regression model.
tscsFit(y, x, grp[, tsc])¶
tscsFit(dataset, formula, grp[, tsc])
y (Nx1 vector) – data.
dataset (string) – name of data set or null string.
formula (string) – formula string of the model. E.g.
"y ~ X1 + X2"‘y’ is the name of dependent variable, ‘
X1’ and ‘
X2’ are names of independent variables; E.g.
"y ~ .", ‘.’ means including all variables except dependent variable ‘y’;
grp (Matrix) – NTx1 of group identifiers.
tsc (struct) –
Optional input. Instance of a tscsmtControl structure. The following members of tsc are referenced within this routine:
string, specifies the format for the output header. tsc.header can contain zero or more of the following characters:
title is to be printed.
lines are to bracket the title.
a date and time is to be printed.
version number of program is to be printed
file name being analyzed is to be printed
tsc.header = "tld";
tsc.header = "", no header is printed. Default = “tldvf”.
scalar. If 1, the ind ividual-specific effects are not printed. Default = 0.
scalar, if nonzero, results are printed to screen. Default = 1.
scalar, Possible values are: Default = 0.
Uses the fixed effects estimates of the ind ividual-specific effects to estimate the variance components of the random effects model. Us:e: this option if there are a different number of observations for each cross-sectional unit. Th:e: chi-squared test for the individual error components equal to 0 may not be correct if there are a different number of observations for each individual.
Uses regression on group means to estimate variance components.
Default = 0.
string, the name of a file in which to save the group means of the dataset. By default, tsc.mnsfn = “”, so the means are not saved.
scalar, controls the type of models to be estimated. Possible values are:
All models are estimated.
The random effects (error components model) is not estimated.
scalar, “row factor.” If tscsFit fails due to insufficient memory while attempting to read a GAUSS dataset, tsc.rowfac may be set to some value between 0 and 1 to read a proportion of the original number of rows of the GAUSS dataset. For example, setting
tsc.rowfac = 0.8;
causes GAUSS to read in 80% of the rows of the GAUSS dataset that were read when the failure due to insufficient memory occurred. tsc.rowfac has an effect only when tsc.row = 0.
Default = 1.
scalar. If 1, print standardized estimates of regression parameters. Default = 1.
string, a title to be printed at the top of the output header (see tsc.header). By default, no title is printed (tsc.title = “”).
tso (struct) –
An instance of a
tscsFitOutstructure containing the following members:
Kx1 vector, regression coefficients from the dummy effects model (excluding individual-variables regression model).
KxK matrix, variance-covariance matrix of the dummy variables regression model.
(K+1)x(K+1) matrix, moment matrix of the transformed variables (including a constant) from the dummy variables regression model.
Kx1 vector, regression coefficients from the random effects regression model.
KxK matrix, variance-covariance matrix of the random effects regression model..
(K+1)x(K+1) matrix, moment matrix of the transformed variables (including a constant) from the random effects regression model.
matrix, fixed effects dummy variable estimates.
matrix, standard error of fixed effects dummy variable estimates.
matrix, estimated of random effects.
matrix, fixed effects model estimated dependent variable.
matrix, random effects model estimated dependent variable.
matrix, fixed effects model residuals.
matrix, random model effects residuals.
new; cls,; library tsmt; //Declare tscsmt output structure struct tscsmtOut tso; //Estimate model tso = tscsFit( getGAUSSHome() $+ "pkgs/tsmt/examples/grunfeld.dat", "investment~firm_value + capital", "firm");
new; cls; library tsmt; //Load data from dataset data=loadd(getGAUSSHome() $+ "pkgs/tsmt/examples/munnell"); //Independent variable y = data[., 2]; //Dependent variable x = data[., 3:6]; //Group variable grp = data[.,1]; //Declare tscsmt output structure struct tscsmtOut tso; //Estimate model tso = tscsFit(y, x, grp);
The panel data must be contained in a stacked panel GAUSS dataset, with one variable containing an index for the units. From each cross-sectional unit all observations must be grouped together. For example, for the first cross-sectional unit there may be 10 rows in the dataset, for the second cross-sectional unit there may be another 10 rows, and so on. Each row in the dataset contains measurements on the endogenous and exogenous variables measured for each observation along with the index identifying the cross-sectional unit.
The index variable must be a series of integers. While all observations for each cross-sectional unit must be grouped together, they do not have to be sorted according to the index.