Re: [R] help on retrieving output from by( ) for regression

From: TEMPL Matthias <Matthias.Templ_at_statistik.gv.at>
Date: Thu 25 Aug 2005 - 22:57:16 EST


Look more carefully at
?lm
at the See Also section ...

X <- rnorm(30)
Y <- rnorm(30)
lm(Y~X)
summary(lm(Y~X))

Best,
Matthias

> Hi all
>
> I used a function
> > qtrregr <- by(AB, AB$qtr, function(AB) lm(AB$X~AB$Y))
>
> objective is to run a regression on quartery subsets in the
> data set AB, having variables X and Y, grouped by variable qtr.
>
> Now i retrieved the output using qtrregr, however it only
> showed the coefficients (intercept and B) with out
> significant levels and residuals for each qtr. Can some on
> help me on how can retrieve the detailed regression output.
>
> rgds
>
> snvk
>
> ______________________________________________
> R-help@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
>



R-help@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 Received on Thu Aug 25 23:01:35 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:56 EST