[R] CVbinary - Help
Weidong Gu
anopheles123 at gmail.com
Wed Oct 12 18:58:58 CEST 2011
Maybe it was caused by your modeling binary variable using lm rather than glm.
Weidong Gu
On Wed, Oct 12, 2011 at 9:59 AM, anamiguita <anamiguita at gmail.com> wrote:
> Hey,
>
> I need some help.
>
> I want to obtain a cross validation for a regression model (binary response)
> but I got an error with CVbinary. Well I did this:
>
>
> fit <- lm(resp ~ PC1 + PC2 + PC3 + PC4 + PC5 + PC6 + PC7 + PC8 +
> PC9+PC10+PC11+PC12+PC13+PC14+PC15+PC16+PC17+PC18+PC19+PC20+PC21+PC22+PC23+PC24+PC25+PC26+PC27+PC28,
> data = dexp.cp, family=binomial())
>
> CVbinary(fit)
> Error in sample(nfolds, m, replace = TRUE) : invalid 'size' argument
>
> I cannot understand this error, I was googling it, but i didn't find nothing
> really helpfull. Can someone help with is?...It's really important.
>
> Thank you for your time,
>
> Ana Rita
>
> --
> View this message in context: http://r.789695.n4.nabble.com/CVbinary-Help-tp3898065p3898065.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list