Re: [R] clustered standarderrors using design package

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Sat, 19 May 2007 18:54:07 -0500

Anders Eklund wrote:
> Please help,
>
> I have a strange problem. I've got a balanced panel data set. I use dummy
> variable regression and I've got results with lm function.
>
> summary(lm(y ~ post + t19961 + t19962 + t19963 + t19964 + t19971 + t19972
> + t19973 + t19974 + t19981+factor( id)))
>
>
> The problem is that I would like to get my standard errors clustered but
> then gets the following error message:
>
> f<-(lm(y ~ post + t19961 + t19962 + t19963 + t19964 + t19971 + t19972 +
> t19973 + t19974 + t19981+factor( id)))

Omit id from the model (usually) and do
library(Design)

f <- ols(y ~ post + . . . , x=TRUE, y=TRUE) g.clust1 <- robcov(f, id)

Frank

> library(Design)
> g.clust1 <- robcov(f, id)
> Error in match.arg(type) : 'arg' should be one of working, response,
> deviance, pearson, partial
>
> All my variables is vectors and I've tried with other variables inside and
> outside the model and all results in the same errormessage.
>
> Best regards
>
> Anders Eklund
> Stockholm, Sweden.
>
> ______________________________________________
> 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.
>

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
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.
Received on Sat 19 May 2007 - 23:59:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 20 May 2007 - 03:31:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.