?vcov
You can use vcov(lm.obj) to extract the covariance matrix, where lm.obj is
your fitted object from lm().
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of
See ?vcov .
On Mon, 29 Oct 2007, Peter B. Mandeville wrote:
Greetings,
Cohen, Cohen, West, and Aiken 2003 (Applied Multiple Regression-Correlation
Analysis for the Behavioral Sciences, Third Edition) on page 273 state the
covariance matrix of the regression coefficients is provided by
Peter B. Mandeville wrote:
Greetings,
Cohen, Cohen, West, and Aiken 2003 (Applied Multiple Regression-Correlation
Analysis for the Behavioral Sciences, Third Edition) on page 273 state the
covariance matrix of the regression coefficients is provided by standard
programs for multiple
If X is your p-1 variable matrix (with the first column vector being 1s),
i.e., nrow(X)=n and ncol(X)=p
then
MSE-summary(lm(Y~X[2]+X[3] + ...X[P-1]))$s^2
and your coefficient (co)variance matrix is
MSE*ginv(t(X)%*%X)
Best,
Alex
On 10/29/07, Peter B. Mandeville [EMAIL PROTECTED] wrote:
Dear Peter,
See ?vcov. You could have discovered this via
help.search(covariance).
I hope this helps,
John
On Mon, 29 Oct 2007 11:30:11 -0600
Peter B. Mandeville [EMAIL PROTECTED] wrote:
Greetings,
Cohen, Cohen, West, and Aiken 2003 (Applied Multiple
Regression-Correlation
Analysis
: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of A. Beaujean
Sent: Monday, October 29, 2007 4:25 PM
To: Peter B. Mandeville
Cc: r-help
Subject: Re: [R] covariance matrix of the regression coefficients
If X is your p-1 variable matrix (with the first column
vector being 1s), i.e
6 matches
Mail list logo