Dear list members.

I have problems with the usage of cv.glm from the boot package. Here are some 
parts of the script I wanted to use:

data <- read.table("selected_2D.csv", header=TRUE, sep=",")
… 
glm.fitted <- glm("ydata$ y  ~ 1 + density + vsurf_ID6 + vsurf_S ", data=data)
error <- cv.glm(data=data, glm.fitted, K=6)

ydata$y is a separate data set, where I take my independent data from. I build 
an equation with some of the columns in data. Then I generate the generalized 
linear model, which works. But when I try to run the last line – the cv.glm 
function, I get the following error message:

Error in model.frame.default(formula = eqfull, data = list(vsurf_ID6 = 
c(2.4599824,  :
  variable lengths differ (found for 'density')

I fear I don't get the meaning of the error message at all. The length of the 
data columns are all equal. Any help would be kindly appreciated!

Best wishes,
Markus




______________________________________________
R-help@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.

Reply via email to