[R] cv.glm problem

Amit Sengupta asengupta94404 at yahoo.com
Wed Jun 15 23:46:35 CEST 2016


HI,I am analyzing a risk model for type 2 diabetes using a logistic regression. In the final model I have only 6 predictors. The regression gives correct output (fullmod is the fitted model). Now I have a subset of dataset (mydata1) with 7 variables (1 response(0/1) + 6 predictors) and try to do cross validation using cv.glm. The dataset mydata1 has 1410 rows and no NA entry. This is the problem I run into (It does not matter what K I choose). Any help in this matter will be appreciated.
> cv.glm(mydata1,fullmod,K=6)
Error in if ((K > n) || (K <= 1)) stop("'K' outside allowable range") : 
  missing value where TRUE/FALSE needed
Regards,Amit

	[[alternative HTML version deleted]]



More information about the R-help mailing list