| Home » Countries » India » k fold cross validation for logistic regression in R (stuck up using cross validation using surveyCV package) Goto Forum:
	| 
		
			| Re: k fold cross validation for logistic regression in R [message #26409 is a reply to message #26199] | Fri, 17 March 2023 03:45   |  
			| 
				
				
					|  dhivvyajp@am.amrita.edu Messages: 4
 Registered: January 2023
 | Member |  |  |  
	| I tried the following also. But not able to fix the error. 
 > cv.svy(train, formulae = " InternetUsage~RuralOrUrban+AgeGroup+WealthIndex+SchoolingCom pleted+Religion+Caste+MaritalStatus+Occupation+Gender+Litera cy+OwnsMobile ", method = "logistic", nfolds=3, strataID = train$strata, clusterID = train$Cluster, nest = T, weightsID = train$samplewt)
 ....................................Error in .subset2(x, i, exact = exact) : no such index at level 1[/color]
 > cv.svy(train, formulae = " InternetUsage~RuralOrUrban+AgeGroup+WealthIndex+SchoolingCom pleted+Religion+Caste+MaritalStatus+Occupation+Gender+Litera cy+OwnsMobile ", method = "logistic", nfolds=3, strataID = train$strata, clusterID = train$Cluster, nest = F, weightsID = train$samplewt)
 ....................................Error in .subset2(x, i, exact = exact) : no such index at level 1
 > cv.svyglm(svylogistic, nfolds=3,na.rm=FALSE)
 ....................................Error in if (clusterID %in% c("0", "1")) { : the condition has length > 1
 
 Can anyone help me in fixing this error?
 |  
	|  |  | 
 
 Current Time: Fri Oct 31 07:15:01 Coordinated Universal Time 2025 |