[R] Partial R-square in multiple linear regression

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Jun 3 17:00:52 CEST 2012



On 01.06.2012 21:05, Jin Choi wrote:
> Hello,
>
> I am trying to obtain the partial r-square values (r^2 or R2) for
> individual predictors of an outcome variable in multiple linear
> regression. I am using the 'lm' function to calculate the beta
> coefficients, however, I would like to know the individual %
> contributions of several indepenent variables. I tried searching for
> this function in many R packages, but it has proven elusive to me. I
> am an R beginner, and I am hoping that I will find a solution!


summary(lm(...)) calculates the R^2. See ?summary.lm

Uwe Ligges

> Thank you very much.
>
> Sincerely,
>
> Jin Choi
> MSc Epidemiology student
> McGill University, Montreal, Quebec, CANADA
>
> ______________________________________________
> 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