s-news
[Top] [All Lists]

Re: [S] on vcov()

To: Stephanie MAHEVAS <Stephanie.Mahevas@ifremer.fr>
Subject: Re: [S] on vcov()
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
Date: Mon, 24 Jan 2000 09:52:44 +0000 (GMT)
Cc: S-News <s-news@wubios.wustl.edu>
In-reply-to: <388C1E30.4E3E0A54@ifremer.fr>
Sender: owner-s-news@wubios.wustl.edu
On Mon, 24 Jan 2000, Stephanie MAHEVAS wrote:

> I do a simple linear model with n factors and each factor has
> respectively
> N(i) levels (i=1,..,n). The contrasts for fitting are default ones. To
> get the estimators' variance (to construct confidence intervals of each
> estimator' coefficient) I use the fonction vcov(lm.out) of
> library(MASS).
> The size of the variance-covariance matrix is
> [(1+(N(1)-1)+...+(N(n)-1))]*[(1+(N(1)-1)+...+(N(n)-1))] and not
> [(1+N(1)+...+N(n))]*[(1+N(1)+...+N(n))] as I would like ...!
> 
> WHY and anyone know how to get the variance of each coefficient
> (associated to each level factor)?

Take a look at the coefficient estimates. vcov is giving the variance
matrix of those, not what you think they should be. In a 2^n design there
are n coefficient estimates for the main effects, not 2n as your formula
says you are expecting.

I think you need to understand the way S fits linear models with factors
better: I assume you _have_ read the book whose software you are using?

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>