0

i'm trying to create a logistic model using boot() function. My dependent variable (factor:0,1) has a low number of defaults (were the dependent variable is = 1), so when using boot() some of the samples dont have any defaults, so i get an when trying to bootstrap. I have tried changing the proportion of 1 and 0 in the dependent variable but I fear this changes my model is there a way to solve this?

thanks!

StupidWolf
  • 45,075
  • 17
  • 40
  • 72
Mailo
  • 37
  • 4
  • 2
    What exactly are you trying to do? What are you getting out of the bootstrap? – Heroka Sep 22 '15 at 16:23
  • this is the function im using while bootstrapping: bs<-function(formula,data,indices){ a1<-data[indices,] model<-glm(formula,data=a1,family="binomial") return(coef(model)) } resultados<-boot(data=a,statistic=bs,R=1000,formula=int~ X1 + X2 + X3 + X4) – Mailo Sep 22 '15 at 16:29
  • Since you're new to SO, please carefully read [this](http://stackoverflow.com/help/mcve) and [this](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610) and then update your question to conform to these guidelines. – jlhoward Sep 22 '15 at 18:40

0 Answers0