[R] cv.lm syntax error

agent dunham crosspide at hotmail.com
Thu Mar 17 17:47:56 CET 2011


I rewrite my previous comand, CVlm works now. It was related to having the
same names in the df than in the formula included at CVlm . 

Now I'd like to know:

Q1: if the seed is of any special importance, or I can type just seed=29
like in the example? 

Q2: I typed: 

CVlm(df = mydf, form.lm = formula(response~v1+v2+factor), m=3, dots = TRUE,
seed=29, plotit=TRUE, printit=TRUE)

In case is important factor has three levels, this way: table(factor): 
levels: 2  3  4
                                                                                            
freq:   2 21 34

And when the 3rd Fold it says: 

fold 3 
Observations in test set: 2 5 6 8 11 13 15 16 17 22 29 33 35 37 41 46 51 52
55 
Error en model.frame.default(Terms, newdata, na.action = na.action, xlev =
object$xlevels) : 
  factor 'factor' has new level(s) 2

What does it mean?

Thanks in advance,user at host.com

--
View this message in context: http://r.789695.n4.nabble.com/cv-lm-syntax-error-tp3334889p3385065.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list