[R] cv.lm syntax error

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Mar 4 18:19:52 CET 2011



On 04.03.2011 10:11, agent dunham wrote:
> Dear all,
>
> I've tried a multiple regression, and now I want to try a cross-validation.
>
> I obtain this error (it must be sth related to df) that I don't understand,
> any help would be appreciated.
>
> cv.lm(df= dat, lm2.52f, m=3)
>
> Error en `[.data.frame`(df, , ynam) : undefined columns selected
>
> lm2.52f is my lm object,

If this is the cv.lm from the DAAG package (unstated), then please read 
its help page and find that you need to specify a formula as the second 
argument rather than an already fitted lm object.

Uwe Ligges



 > dat is a dataframe where the variables involved in
> .lm are
>
> I tried CVlm also but the same error
>
> Thanks, user at host.com
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/cv-lm-syntax-error-tp3334889p3334889.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list