Displaying 1 result from an estimated 1 matches for "x_cl".
Did you mean:
_cl
2020 Nov 03
2
Query on constrained regressions using -mgcv- and -pcls-
...x.3 0.298 0.0010 297.8 0
x.4 0.103 0.0011 94.8 0
but this one does not for a panel dataset:
set.seed(02102020)
N=500
M=10
rater=rep(1:M, each = N)
lead_n=as.factor(rep(1:N,M))
a=rep(rnorm(N),M)
z=rep(round(25+2*rnorm(N)+.2*a))
x=a+rnorm(N*M)
y=.5*x+5*a-.5*z+2*rnorm(N*M)
x_cl=rep(aggregate(x,list(lead_n) mean)[,2],M)
model=lm(y~x+x_cl+z)
summary(model)
y=1+1.5*x+4.6*x_cl-0.5*z
x.mat=cbind(rep(1,length(y)),x,x_cl,z)
ls.print(lsfit(x.mat,y,intercept=FALSE))
Residual Standard Error=0
R-Square=1
F-statistic (df=4, 4996)=5.06e+30
p-value=0
Estimate Std.Err t-value P...