fpostest {regsc} | R Documentation |
After estimating the set of break dates, fpostest
estimates the regression using the least squares. The procedure also works for the case where there is no structural change in the model.
fpostest(y,x,regime,z)
y |
An |
x |
An |
regime |
a |
z |
An optional |
A list containing the following components:
alpha |
a |
Sigma |
the estimated covariance matrix for |
ssr |
the sum of squared residuals |
R2 |
the overall goodness-of-fit |
resid |
an |
Junhui Qian and Liangjun Su
Qian, J., L. Su, 2016, "Shrinkage estimation of regression models with multiple structural changes", Econometric Theory, 32 (6), 1376-1433.
n=120;p=2;q=3;sigma=0.5 x=rnorm(n*p) dim(x)<-c(n,p) z=rnorm(n*q) dim(z)<-c(n,q) beta0=c(rep(1,n/2),rep(0.5,n/2)) beta0=rep(beta0,p) dim(beta0)<-c(n,p) gamma0=rep(1,q) dim(gamma0)<-c(q,1) y = rowSums(x*beta0) + z %*% gamma0 + sigma*rnorm(n) regime=c(1,61,121) res=fpostest(y,x,regime,z)