Panel equation regressions
res=pfixed(namey,arg1,...,argn)
* namey = a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes (this last case is the only one authorized if you are using a 'panel data' tlist, see below)
* arg1 =
- either a 'panel data' tlist (generally imported from a .csv database by function impexc2bd)
- or an endogenous variable taking the form of a time series, a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes
* arg2,...,argn =
- if first input of arg1,...,argn was a 'panel data' tlist then: other input are optional and can be:
. either 'x=name1;...;namep' where name1,...,namep are a subset of the names of the variables that are in the database
. the string 'nameid=name1,..., namen' where name1,...,namen are names of individuals present in the database
. or the string 'noprint' if the user does not want to print the estimation results
- if first input of arg1,...,argn was an endegnous variable then either:
. a time series
. a real (nxk) matrix
. a (k x 1) string vector of names of time series, vectors or matrices
. the string 'id=v' where v is the vector of individuals attached to the y and x data (this argument must be present somewhere in the list of variables arguments)
- 'hac=ccm' for "clustered" covariance matrix of Arellano (1987) recommended when T is fixed and N large but "works" also when T is large and N fixed see Hansen C. B. (2007) (reference below) or 'hac=nw' for a Newey-west type estimator recommended when T is large and N fixed (see references) or 'hac=mbb' for a moving block bootstrap etimation of the symetric percentile-t confidence interval of the betas
- 'nboot=xxx' number of bootstrap replications when 'hac=mbb' (default=999)
- 'alpha=xxx' with 0<xxx<1 the confidence level (default=0.95) for the symetric percentile-t confidence interval
- 'win=xxx' the length of the Barlett window kernel estimator (default = automatic selection by Andrews (1991) method using an AR(1) model)
- the string 'noprint' if the user doesn't want the to print the results of the regression
* res = a tlist with
-res('meth') = 'panel with random effects'
-res('y') = y data vector
-res('x') = x data matrix
-res('nobs') = nobs
-res('nvar') = nvars
-res('beta') = bhat
-res('yhat') = yhat
-res('resid') = residuals
-res('vcovar') = estimated variance-covariance matrix of beta
-res('sige') = estimated variance of the residuals
-res('sige') = estimated variance of the residuals
-res('ser') = standard error of the regression
-res('tstat') = t-stats
-res('pvalue') = pvalue of the betas
-res('condindex') = multicolinearity cond index
-res('prescte') = boolean indicating the presence or absence of a constant in the regression
-res('rsqr') = rsquared
-res('rbar') = rbar-squared
-res('f') = F-stat for the nullity of coefficients other than the constant
-res('pvaluef') = its significance level
load(GROCERDIR+'\macros\grocer\db\judgepanel.dat') ; r2 = pfixed('y',judgepanel); // Example is taken from function panel_d. Provides fixed panel estimation on Judge et alii example. | ![]() | ![]() |