Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.SOC.4.64.1209281134020.13852@solcom.hrz.uni-giessen.de>
Date: 2012-09-28T09:36:20Z
From: Gerrit Eichner
Subject: Running different Regressions using for loops
In-Reply-To: <6be5e1cd6643a876bffc33138ad6438c@mail.gmail.com>

Hello, Krunal,

try

> summ.list[[2]]$coefficients[2]

Note the double square brackets (as summ.list is a list)!

Hth,

Gerrit


On Fri, 28 Sep 2012, Krunal Nanavati wrote:

> Hi Rui,
>
> Excellent!!  This is what I was looking for. Thanks for the help.
>
> So, now I have stored the result of the 10 regressions in      "summ.list
> <- lapply(lm.list2, summary)"
>
> And now once I enter        " sum.list "....it gives me the output for all
> the 10 regressions...
>
> I wanted to access a beta coefficient of one of the regressions....say
> "Price2+Media1+Trend+Seasonality"...the result of which is stored in     "
> sum.list[2] "
>
> I entered the below statement for accessing the Beta coefficient for
> Price2...
>
>> summ.list[2]$coefficients[2]
> NULL
>
> But this is giving me " NULL " as the output...
>
> What I am looking for, is to access a beta value of a particular variable
> from a particular regression output and use it for further analysis.
>

<<<snip>>>