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

Dieter Menne dieter.menne at menne-biomed.de
Wed Feb 6 09:34:53 CET 2008


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



More information about the R-help mailing list