Re: [R] cv.lm syntax error

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Fri, 04 Mar 2011 18:19:52 +0100

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.



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. Received on Fri 04 Mar 2011 - 17:24:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Mar 2011 - 17:40:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive