[R] data analysis for partial two-by-two factorial design
Ding, Yuan Chun
ycding at coh.org
Mon Mar 5 23:44:30 CET 2018
Hi Bert and David,
Thank you so much for willingness to spend some time on my problem!!! I have some statistical knowledge (going to get a master in applied statisitics), but do not have a chance to purse a phD for statistics, so I am always be careful before starting to do analysis and hope to gather supportive information from real statisticians.
Sorry that I did not tell more info about experiment design.
I did not do this experiment, my collaborator did it and I only got chance to analyze the data.
There are nine dishes of cells. Three replicates for each treatment combination. So randomly select three dishes for no drug A/no drug B treatment, a second three dishes for drug A only, then last three dishes to add both A and B drugs. After drug treatments, they measure DNA methylation and genes or gene expression as outcome or response variables(two differnet types of response variables).
My boss might want to find out net effect of drug B, but I think we can not exclude the confounding effect of drugA. For example, it is possible that drug B has no effect, only has effect when drug A is present. I asked my collaborator whey she omitted the fourth combination drugA only treatment, she said it was expensive to measure methylation or gene expression, so they performed the experiments based on their hypothesis which is too complicated here, so not illustrated here in details. I am still not happy that they could just add three more replicates to do a full 2X2 design.
On the weekend, I also thought about doing a one-way anova, but then I have to do three pairwise comparisons to find out the pair to show difference if p value for one way anova is significant.
Thanks,
Ding
From: Bert Gunter [mailto:bgunter.4567 at gmail.com]
Sent: Monday, March 05, 2018 2:27 PM
To: David Winsemius
Cc: Ding, Yuan Chun; r-help at r-project.org
Subject: Re: [R] data analysis for partial two-by-two factorial design
David:
I believe your response on SO is incorrect. This is a standard OFAT (one factor at a time) design, so that assuming additivity (no interactions), the effects of drugA and drugB can be determined via the model you rejected:
For example, if baseline control (no drugs) has a response of 0, drugA has an effect of 1, drugB has an effect of 2, and the effects are additive, with no noise we would have:
> d <- data.frame(drugA = c("n","y","y"),drugB = c("n","n","y"))
> y <- c(0,1,3)
And a straighforward inear model recovers the effects:
> lm(y ~ drugA + drugB, data=d)
Call:
lm(formula = y ~ drugA + drugB, data = d)
Coefficients:
(Intercept) drugAy drugBy
1.282e-16 1.000e+00 2.000e+00
As usual, OFAT designs are blind to interactions, so that if they really exist, the interpretation as additive effects is incorrect.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Mar 5, 2018 at 2:03 PM, David Winsemius <dwinsemius at comcast.net<mailto:dwinsemius at comcast.net>> wrote:
> On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <ycding at coh.org<mailto:ycding at coh.org>> wrote:
>
> Hi Bert,
>
> I am very sorry to bother you again.
>
> For the following question, as you suggested, I posted it in both Biostars website and stackexchange website, so far no reply.
>
> I really hope that you can do me a great favor to share your points about how to explain the coefficients for drug A and drug B if run anova model (response variable = drug A + drug B). is it different from running three separate T tests?
>
> Thank you so much!!
>
> Ding
>
> I need to analyze data generated from a partial two-by-two factorial design: two levels for drug A (yes, no), two levels for drug B (yes, no); however, data points are available only for three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. I think we can not investigate interaction between drug A and drug B, can I still run model using R as usual: response variable = drug A + drug B? any suggestion is appreciated.
Replied on CrossValidated where this would be on-topic.
--
David,
>
>
> From: Bert Gunter [mailto:bgunter.4567 at gmail.com<mailto:bgunter.4567 at gmail.com>]
> Sent: Friday, March 02, 2018 12:32 PM
> To: Ding, Yuan Chun
> Cc: r-help at r-project.org<mailto:r-help at r-project.org>
> Subject: Re: [R] data analysis for partial two-by-two factorial design
>
> ________________________________
> [Attention: This email came from an external source. Do not open attachments or click on links from unknown senders or unexpected emails.]
> ________________________________
>
> This list provides help on R programming (see the posting guide linked below for details on what is/is not considered on topic), and generally avoids discussion of purely statistical issues, which is what your query appears to be. The simple answer is yes, you can fit the model as described, but you clearly need the off topic discussion as to what it does or does not mean. For that, you might try the stats.stackexchange.com<http://stats.stackexchange.com><http://stats.stackexchange.com> statistical site.
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
> On Fri, Mar 2, 2018 at 10:34 AM, Ding, Yuan Chun <ycding at coh.org<mailto:ycding at coh.org><mailto:ycding at coh.org<mailto:ycding at coh.org>>> wrote:
> Dear R users,
>
> I need to analyze data generated from a partial two-by-two factorial design: two levels for drug A (yes, no), two levels for drug B (yes, no); however, data points are available only for three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. I think we can not investigate interaction between drug A and drug B, can I still run model using R as usual: response variable = drug A + drug B? any suggestion is appreciated.
>
> Thank you very much!
>
> Yuan Chun Ding
>
>
> ---------------------------------------------------------------------
> -SECURITY/CONFIDENTIALITY WARNING-
> This message (and any attachments) are intended solely f...{{dropped:28}}
>
> ______________________________________________
> R-help at r-project.org<mailto:R-help at r-project.org><mailto:R-help at r-project.org<mailto:R-help at r-project.org>> mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org<mailto:R-help at r-project.org> mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius
Alameda, CA, USA
'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law
[[alternative HTML version deleted]]
More information about the R-help
mailing list