Re: [R] Linear Regression ?

From: Roland Rau <roland.rproject_at_gmail.com>
Date: Mon, 16 Jun 2008 13:29:29 -0400

Hi,

did you have a look at the manual "An Introduction to R"? (http://cran.r-project.org/doc/manuals/R-intro.html). Chapter "Statistical Models in R" should answer (most of) your questions concerning linear regression.

kayj wrote:
>
> Also each x is a categorical variable with 4 categories so I have to
> introduce three variables for each x
>

If I understood correctly what you mean (-> coding of dummy variables), this is not necessary in R. If you variable is a "factor", R does it for you automatically. If you are unhappy with the choice of reference category, please check:
?relevel

I hope this helps,
Roland



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 Mon 16 Jun 2008 - 17:54:34 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 Mon 16 Jun 2008 - 18:30:41 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