Skip to content
Prev 86554 / 398502 Next

cv.glm function error message in a loop

Please study the help page for cv.glm.  You have not specified `data' 
correctly in the loop case.  The help page says

Arguments:

     data: A matrix or data frame containing the data.  The rows should
           be cases and the columns correspond to variables, one of
           which is the response.

   glmfit: An object of class '"glm"' containing the results of a
           generalized linear model fitted to 'data'.
                                    ^^^^^^^^^^^^^^^^ 
and that is not what you specified.
On Thu, 16 Feb 2006, Maria Beger wrote: