[R] Partial R-square in multiple linear regression

Paul Johnson pauljohn32 at gmail.com
Sun Jun 3 20:05:26 CEST 2012


On Fri, Jun 1, 2012 at 2:05 PM, Jin Choi <oohpsjin at gmail.com> 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!
>
> Thank you very much.
>
> Sincerely,

This is the kind of practical user request I've been trying to answer
in the rockchalk package. I have a function called "getDeltaRsquare".
It takes a fitted regression and calculates the change in Rsquare when
each variable is removed.

It does not achieve the "Partition" idea for Rsquare that you might
want because there is no logically meaningful way to partition Rsquare
among predictors if there is any multicollinearity.  I could point you
at some stat books that try to achieve that partition, mostly they
seem to be by psychologists (who like that kind of thing.)  You will
go down a rabbit hole of "semi-partial correlation coefficients" and
so forth.

But if you just want the "how much does R-square drop if I leave out
this variable," I got that for you :)  Whether that is meaningful to
you, well, that's a bigger methodological question.

pj

>
> 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.



-- 
Paul E. Johnson
Professor, Political Science    Assoc. Director
1541 Lilac Lane, Room 504     Center for Research Methods
University of Kansas               University of Kansas
http://pj.freefaculty.org            http://quant.ku.edu



More information about the R-help mailing list