[R] solution to a regression with multiple independent variable

John Sorkin jsorkin at grecc.umaryland.edu
Sun Nov 5 16:38:55 CET 2006


Please forgive a statistics question.
I know that a simple bivariate linear regression, y=f(x) or in R
parlance lm(y~x) can be solved using the variance-covariance matrix:
beta(x)=covariance(x,y)/variance(x). I also know that a linear
regression with multiple independent variables, for example  y=f(x,z)
can also be solved using the variance-covariance matrix, but I don't
know how to do this. Can someone help me go from the variance-covariance
matrix to the solution of a regression with multiple independent
variables? It is not clear how one applies the matrix solution b=
(x'x)-1*x'y to the elements of the variance-covariance matrix, i.e. how
one gets the required values from the variance-covariance matrix.
Any help, or suggestions would be appreciated.

Thanks,
John

John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of Maryland Clinical Nutrition Research Unit, and
Baltimore VA Center Stroke of Excellence

University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524

(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
jsorkin at grecc.umaryland.edu

Confidentiality Statement:
This email message, including any attachments, is for the so...{{dropped}}



More information about the R-help mailing list