title: cv.glm variable lengths differ
body: <p>I am trying to cv.glm on a linear model however each time I do I get the error </p>
  
  <pre><code>Error in model.frame.default(formula = lindata$Y ~ 0 + lindata$HomeAdv +  : 
  variable lengths differ (found for 'air-force-falcons')
  </code></pre>
  
  <p>air-force-falcons is the first variable in the dataset lindata. When I run glm I get no errors. All the variables are in a single dataset and there are no missing values. </p>
  
  <pre><code>&gt; linearmod5&lt;- glm(lindata$Y ~ 0 + lindata$HomeAdv + ., data=lindata, na.action="na.exclude")
  &gt; set.seed(1)
  &gt; cv.err.lin=cv.glm(lindata,linearmod5,K=10)
  Error in model.frame.default(formula = lindata$Y ~ 0 + lindata$HomeAdv +  : 
  variable lengths differ (found for 'air-force-falcons')
  </code></pre>
  
  <p>I do not know what is driving this error or the solution. Any ideas? Thank you!</p>