Panel equation regressions
rpanel=pfixed_hac1(y,index,x,typvcv,win)
y = a (nobs*nindiv x 1) matrix of all of the individual's observations vertically concatenated. This matrix must include in the first column the dependent variable, the independent variables must follow accordingly.
index = index vector that identifies each observation with an individual e.g. 1 (first 2 observations for individual # 1) 1 2 (next 1 observation for individual # 2) 3 (next 3 observations for individual # 3) 3 3
x = a (nobs*nindiv x k) matrix of exogenous variables
typvcv = 1 or 2 with
- 1 "clustered" covariance matrix of Arellano (1987) recommended when T is fixed and N large but also "works" when T is large and N fixed see Hansen C. B. (2007) (reference below)
- 2 a Newey-west type (Driscoll-Kray) estimator recommended when T is large and N fixed
win = the length of the Barlett window kernel estimator (default = automatic selection by Andrews (1991) using an AR(1) model)
res = a tlist with
rpanel('meth')='panel with fixed effects'
rpanel('y') = y data vector
rpanel('x') = x data matrix
rpanel('nobs') = nobs
rpanel('nvar') = nvars
rpanel('beta') = bhat
rpanel('yhat') = yhat
rpanel('resid') = residuals
rpanel('vcovar') = estimated variance-covariance matrix of beta
rpanel('sige') = estimated variance of the residuals
rpanel('sigu') = sum of squared residuals
rpanel('ser') = standard error of the regression
rpanel('tstat') = t-stats
rpanel('pvalue') = pvalue of the betas
rpanel('condindex') = multicolinearity cond index
rpanel('prescte') = boolean indicating the presence or absence of a constant in the regression
rpanel('lliked') = log-likelihood
rpanel('rsqr') = rsquared
rpanel('rbar') = rbar-squared
rpanel('f') = F-stat for the nullity of coefficients other than the constant
rpanel('pvaluef') = its significance level
res('hac') = type of robust variance matrix in case of HAC estimation