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
|