[R] save the output of summary(lmList(x)) into a dataframe
Cecilia Carmo
cecilia.carmo at ua.pt
Tue Jun 16 16:33:27 CEST 2009
I'm sending the dataframe with my data and the function I
have runned.
regaccdis<-read.table(file="regaccdis.txt", sep="\t",
header=TRUE)
w<- lmList(totaccz~lactivoz+varvolnegz| caedois,
na.action=na.omit,regaccdis,subset=ano==1999)
z<-summary(w)
Thank you all,
Cecília
Em Tue, 16 Jun 2009 09:56:26 -0400
milton ruser <milton.ruser at gmail.com> escreveu:
> Hi Cecilia,
>
> Could you send us a reproducible example?
>
> cheers
>
> milton
>
> On Tue, Jun 16, 2009 at 4:29 AM, Cecilia Carmo
><cecilia.carmo at ua.pt> wrote:
>
>> Hi r-helpers!
>>
>> I need to save the output of summary() function that
>>I’ve runned like this:
>> z<- lmList(y~x1+x2| x3,
>>na.action=na.omit,data1,subset=year==1999)
>> w<-summary(z)
>> The output (w) is something like this:
>> Call:
>> Model: y ~ x1 + x2 | x3
>> Data: data1
>> Coefficients:
>> (Intercept)
>> Estimate Std. Error t value Pr(>|t|)
>> 1 0.081110514 1.141352e-01 7.106531e-01 0.4774081
>> 2 0.384008008 NaN NaN NaN
>> 5 -0.127962259 NaN NaN NaN
>> 14 0.828115409 6.888789e-01 5.427381e-02 0.9567241
>> …
>> x1
>> Estimate Std. Error t value Pr(>|t|)
>> 1 58.06999452 137.263534154 4.230548e-01 0.6723151
>> 2 -202.45105435 NaN NaN NaN
>> 5 NaN NaN NaN NaN
>> 14 0.12776835 0.047486161 1.262510e-02 0.9899286
>> …
>> x2
>> Estimate Std. Error t value Pr(>|t|)
>> 1 -0.173986693 2.126186e-01 -8.183043e-01 4.133115e-01
>> 2 -0.630343567 NaN NaN NaN
>> 5 NaN NaN NaN NaN
>> 14 0.737871169 -3.203230e+01 3.840265e+01 0.000000e+00
>> …
>> Residual standard error: 0.2261486 on 1522 degrees of
>>freedom
>>
>> I would like to have this output in a dataframe like
>>this:
>> x3 intercept x1 x2 Std. Error t value Pr(>|t|)
>> 1 …
>> 2
>> 5
>> 14
>> …
>>
>> Anyone knows if it is possible and how?
>>
>> Thanks in advance,
>>
>> Cecília Carmo (Universidade de Aveiro – Portugal)
>>
>> ______________________________________________
>> 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<http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained,
>>reproducible code.
>>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: regaccdis.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090616/03a93531/attachment-0002.txt>
More information about the R-help
mailing list