Displaying 1 result from an estimated 1 matches for "woodycover".
2008 Sep 10
1
bootstrapping - number of items to replace is not a multiple of replacement length
...I run my script.
I have a data.frame with 73 lines and 21 column.
I am running a stepwise regression to find the best model using the R
function "step".
I apply bootstrapping to obtain model coefficients.
This is my script:
# "datare80" is the name of the data.frame and "woodycover" is the response
variable
theta <- function(datare80, indices) {
d <- datare80[indices, ] # allows boot to select subsample
datasets
full <- lm(d$woodycover~ ., data= d )
lmbroadst <- step(full, data=d , direction = "both", k=2,
t...