Message-ID: <Pine.LNX.4.44.0304240901330.19234-100000@gannet.stats>
Date: 2003-04-24T08:04:22Z
From: Brian Ripley
Subject: regression parms var-cov matrix
In-Reply-To: <5.1.0.14.2.20030423192909.01e89210@mcmail.cis.mcmaster.ca>
On Wed, 23 Apr 2003, John Fox wrote:
> vcov(blah.lm) will do the trick.
Well, it will do what David *said* blah.lm$R is, but in fact it is the
triangular decomposition of the model matrix which is part of the qr
component in R. So if David had been porting R code he would need to be
careful.
> At 06:51 PM 4/23/2003 -0400, Paul, David A wrote:
> >Win2k, R1.6.2.
> >
> >I've been using Splus 6.1 and wanted to try the same
> >regression analysis in R. Using "names( blah.lm )"
> >in R yields
> >
> > [1] "coefficients" "residuals" "effects" "rank"
> > [5] "fitted.values" "assign" "qr" "df.residual"
> > [9] "xlevels" "call" "terms" "model"
> >
> >In Splus, the same command yields
> >
> > [1] "coefficients" "residuals" "fitted.values" "effects"
> > [5] "R" "rank" "assign" "df.residual"
> > [9] "contrasts" "terms" "call"
> >
> >and blah.lm$R gives the variance-covariance matrix of the
> >model parameters. How do get the variance-covariance matrix out
> >of R? Apologies for such a simple question.
--
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