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? Thanks in advance for your assistance. Linda [[alternative HTML version deleted]]
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
Linda, At 4:36 PM -0700 8/15/08, 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? > >Thanks in advance for your assistance. > >Linda >look at mat.regress in the psych package. It will do some of what you might want. That is to say, it will do a multiple regression from the correlation matrix and give you appropriate tests for the given sample size. Bill -- William Revelle http://personality-project.org/revelle.html Professor http://personality-project.org/personality.html Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ Attend ISSID/ARP:2009 http://issid.org/issid.2009/