[R] solution to a regression with multiple independent variable

Pfaff, Bernhard Dr. Bernhard_Pfaff at fra.invesco.com
Mon Nov 6 10:53:29 CET 2006


Hello John,

you can derive these estimators by considering a step-wise approach:

1) Derive the estimators by evaluating a model with demeaned variables,
i.e.
consider (\tilde{X}'\tilde{x})^-1 \tilde{x}'\tilde{y}, where \tilde{...}
refers to the demeaned variables.
2) Obtain the estimate of the intercept, by utilising the
"Schwerpunkteigenschaft" of the OLS estimator.


HTH,
Bernhard


>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}}
>
>______________________________________________
>R-help at stat.math.ethz.ch 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.
>
*****************************************************************
Confidentiality Note: The information contained in this mess...{{dropped}}



More information about the R-help mailing list