Re: [R] How to generate table output of a series of lm's

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Wed, 6 Feb 2008 08:34:53 +0000 (UTC)

Martin Elff <elff <at> sowi.uni-mannheim.de> writes:

>
> modco <- list(
> lm(normskvop ~ I(nts^0.5)-1, data = colo,weights=wtz),
> lm(normskvop ~ I(nts^0.5)-1, data = colo,weights=wtz, subset=sector!="X"),
> lm(normskvop ~ I(nts^0.5)-1, data = colo,weights=wtz, subset=sector!="A"),
> lm(normskvop ~ I(nts^0.5)-1, data = colo,weights=wtz, subset=sector=="A"),
> lm(normskvop ~ I(nts^0.5)-1, data = colo,weights=wtz, subset=sector=="M")
> )
>
> sapply(modco,function(x) coef(summary(x)))

This works, but consider if

lm(normskvop ~ I(nts^0.5)-1+sector, data = colo,weights=wtz),

is a better approach anyway.

Dieter



R-help_at_r-project.org 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 Wed 06 Feb 2008 - 08:37:02 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 Wed 06 Feb 2008 - 10:30:11 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.

list of date sections of archive