search for: lead_n

Displaying 1 result from an estimated 1 matches for "lead_n".

Did you mean: head_n
2020 Nov 03
2
Query on constrained regressions using -mgcv- and -pcls-
...(>|t|) 1.000 0.0010 1043.9 0 x.1 0.501 0.0010 512.6 0 x.2 -0.202 0.0009 -231.6 0 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=FA...