Hi;
Is there a faster way to run this code?
Ab<- matrix(numeric(1),nrow=2,ncol=1000)
Bb<- matrix(numeric(1),nrow=2,ncol=1000)
for(j in 1:1000) {
for(i in 1:1000) {
eq<- sample(stud,replace=T)
ystar<- beta.r*x+eq+b0
Ab[,i]<- wwfit(x,ystar)$coef
}
Bb[1,j]<-sd(Ab[1,])
Bb[2,j]<-sd(Ab[2,])
}
se1<- mean(Bb[1,])
se2<- mean(Bb[2,])
se1
se2
THANKS A LOT.
---------------------------------
[[alternative HTML version deleted]]