search for: varofy

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

2011 Aug 12
1
Which Durbin-Watson is correct? (weights involved) - using durbinWatsonTest and dwtest (packages car and lmtest)
...,k), sigma=sigma, method="chol")) names(mypop)<-paste("x",1:k,sep="") set.seed(123) mypop$x11<-sample(c(0,1),100000,replace=T) set.seed(123) betas<-round(abs(rnorm(k+1)),2) # desired betas Y<-as.matrix(mypop) %*% betas mypop<-cbind(mypop, Y) rSQR<-.5 VARofY<- mean(apply(as.data.frame(mypop$Y),2,function(x){x^2})) - mean(mypop$Y)^2 mypop$Y<-mypop$Y + rnorm(100000, mean=0, sd=sqrt(VARofY/rSQR-VARofY)) n<-200 set.seed(123) cases.for.sample<-sample(100000,n,replace=F) mysample<-mypop[cases.for.sample,] mysample<-cbind(mysample[k+2],mysa...