bootstrap logistic regression

Hi, I had a problem to find what is wrong on the following codes
logistic_coef <-function(d, i){
d <- d[i,]
fit <- glm(bpd ~ birthwt + gestage + toxemia,
data = d,
family = "binomial")
return(coef(fit))
}

#apply the boot() function
set.seed(77)
boot_logistic <- boot(data = bpd,
statisitc = logistic_coef,
R=5000)
error message: Error in statistic(data, original, ...) :
argument "statistic" is missing, with no default

statisitc != statistic

any help is appreciated!

Do you consider the issue solved ?

1 Like

thanks a lot! i couldn't find the error. it works now.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.