Dear all,

I am trying to set up a list with 1:c objects each meant to capture the coefficients for one coefficient and 100 replications. I receive the following error message:

Error in betaboot[[p]] : subscript out of bounds.

My code is below. Where is my mistake?

Many thanks,

Thomas

_________________________________
betaboot<-list(NULL)

for (i in 1:c) {
betaboot[[i]]<-cbind()
}


num <- 100 # this is the number of bootstraps

for (i in 1:num) {

    [BOOTSTRAP]

  coef.temp <- coef(model.temp, data=newdata)

  for (p in 1:c){
  betaboot[[p]] <- cbind(betaboot[[p]], coef.temp[,p])
  }

  }

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to