[R] Multiple Regression with Correlation Matrix

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Aug 16 05:19:30 CEST 2008


On Fri, 15 Aug 2008, Linda Zientek wrote:

> Hello,

> In SPSS, a multiple regression can be conducted by inputting the means, 
> standard deviations, sample size, and correlation matrix without 
> actually using the raw dataset. Is it possible to do the same in R?

Yes, it is possible, up to a point (you can find coefficients but not 
residuals, for example).

Perhaps the easiest way is to fake some data: convert the correlation 
matrix to a covariance matrix and use MASS::mvrnorm(empirical=TRUE)

You could also write a function to do it.  It is a very rare request, and 
I am not aware of it having already been done.

> Thanks in advance for your assistance.

> Linda

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list