Hi all,
This subject treats exactly what I am looking for, thank you. Only I would
like to include the p-values (or t-values) in the dataframe, like this:
.id (Intercept) p-value(intercept) quartile
p-value(intercept)
1 CBP090802020.92140 0.00
On Tue, Oct 26, 2010 at 11:55 AM, Dennis Murphy wrote:
> Hi:
>
> When it comes to split, apply, combine, think plyr.
>
> library(plyr)
> ldply(split(afvtprelvefs, afvtprelvefs$basestudy),
> function(x) coef(lm (ef ~ quartile, data=x, weights=1/ef_std)))
Or do it in two steps:
models <- d
> From: David Winsemius [dwinsem...@comcast.net]
> Sent: 26 October 2010 16:37
> To: Small Sandy (NHS Greater Glasgow & Clyde)
> Cc: r-help@r-project.org
> Subject: Re: [R] Forcing results from lm into datframe
>
> On Oct 26, 2010, a
Try this:
sapply(by(x, x$basestudy, lm, formula = ef ~ quartile), coef)
On Tue, Oct 26, 2010 at 1:08 PM, Small Sandy (NHS Greater Glasgow & Clyde) <
sandy.sm...@nhs.net> wrote:
> Hi
>
> I need some help getting results from multiple linear models into a
> dataframe.
> Let me explain the problem.
d Winsemius [dwinsem...@comcast.net]
Sent: 26 October 2010 16:37
To: Small Sandy (NHS Greater Glasgow & Clyde)
Cc: r-help@r-project.org
Subject: Re: [R] Forcing results from lm into datframe
On Oct 26, 2010, at 8:08 AM, Small Sandy (NHS Greater Glasgow & Clyde)
wrote:
Hi
I need some help g
nsemius [dwinsem...@comcast.net]
Sent: 26 October 2010 16:37
To: Small Sandy (NHS Greater Glasgow & Clyde)
Cc: r-help@r-project.org
Subject: Re: [R] Forcing results from lm into datframe
On Oct 26, 2010, at 8:08 AM, Small Sandy (NHS Greater Glasgow & Clyde)
wrote:
> Hi
>
> I need some h
On Oct 26, 2010, at 8:08 AM, Small Sandy (NHS Greater Glasgow & Clyde)
wrote:
Hi
I need some help getting results from multiple linear models into a
dataframe.
Let me explain the problem.
I have a dataframe with ejection fraction results measured over a
number of quartiles and grouped
Hi
I need some help getting results from multiple linear models into a dataframe.
Let me explain the problem.
I have a dataframe with ejection fraction results measured over a number of
quartiles and grouped by base_study.
My dataframe (800 different base_studies) looks like
> afvtprelvefs
base
8 matches
Mail list logo