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}} ______________________________________________ [hidden email] 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. |
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 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 <[hidden email]> 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...{{dropped:13}} ______________________________________________ [hidden email] 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. |
Hi Bert,
Thank you so much for your direction, I have asked a question on stackexchange website. Ding From: Bert Gunter [mailto:[hidden email]] Sent: Friday, March 02, 2018 12:32 PM To: Ding, Yuan Chun Cc: [hidden email] 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> 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 <[hidden email]<mailto:[hidden email]>> 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}} ______________________________________________ [hidden email]<mailto:[hidden email]> 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]] ______________________________________________ [hidden email] 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. |
In reply to this post by Bert Gunter-2
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. From: Bert Gunter [mailto:[hidden email]] Sent: Friday, March 02, 2018 12:32 PM To: Ding, Yuan Chun Cc: [hidden email] 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> 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 <[hidden email]<mailto:[hidden email]>> 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}} ______________________________________________ [hidden email]<mailto:[hidden email]> 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]] ______________________________________________ [hidden email] 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. |
> On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]> 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:[hidden email]] > Sent: Friday, March 02, 2018 12:32 PM > To: Ding, Yuan Chun > Cc: [hidden email] > 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> 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 <[hidden email]<mailto:[hidden email]>> 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...{{dropped:31}} ______________________________________________ [hidden email] 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:
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 <[hidden email]> wrote: > > > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]> 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:[hidden email]] > > Sent: Friday, March 02, 2018 12:32 PM > > To: Ding, Yuan Chun > > Cc: [hidden email] > > 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> 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 <[hidden email]<mailto: > [hidden email]>> 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}} > > > > ______________________________________________ > > [hidden email]<mailto:[hidden email]> 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]] > > > > ______________________________________________ > > [hidden email] 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]] ______________________________________________ [hidden email] 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. |
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:[hidden email]] Sent: Monday, March 05, 2018 2:27 PM To: David Winsemius Cc: Ding, Yuan Chun; [hidden email] 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 <[hidden email]<mailto:[hidden email]>> wrote: > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]<mailto:[hidden email]>> 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:[hidden email]<mailto:[hidden email]>] > Sent: Friday, March 02, 2018 12:32 PM > To: Ding, Yuan Chun > Cc: [hidden email]<mailto:[hidden email]> > 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 <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> 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}} > > ______________________________________________ > [hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>> 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]] > > ______________________________________________ > [hidden email]<mailto:[hidden email]> 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]] ______________________________________________ [hidden email] 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. |
I am sorry that I made a typo:
. I asked my collaborator whey she omitted the fourth combination drugA only treatment, I wanted to say . "I asked my collaborator why she omitted the fourth combination drugB only treatment", Ding -----Original Message----- From: R-help [mailto:[hidden email]] On Behalf Of Ding, Yuan Chun Sent: Monday, March 05, 2018 2:45 PM To: Bert Gunter; David Winsemius Cc: [hidden email] Subject: Re: [R] data analysis for partial two-by-two factorial design 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:[hidden email]] Sent: Monday, March 05, 2018 2:27 PM To: David Winsemius Cc: Ding, Yuan Chun; [hidden email] 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 <[hidden email]<mailto:[hidden email]>> wrote: > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]<mailto:[hidden email]>> 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:[hidden email]<mailto:[hidden email]>] > Sent: Friday, March 02, 2018 12:32 PM > To: Ding, Yuan Chun > Cc: [hidden email]<mailto:[hidden email]> > 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 <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> 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}} > > ______________________________________________ > [hidden email]<mailto:[hidden email]><mailto:R-help@r-proj > ect.org<mailto:[hidden email]>> 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]] > > ______________________________________________ > [hidden email]<mailto:[hidden email]> 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]] ______________________________________________ [hidden email] 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. ______________________________________________ [hidden email] 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. |
In reply to this post by Bert Gunter-2
> On Mar 5, 2018, at 2:27 PM, Bert Gunter <[hidden email]> wrote: > > 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: >> three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. > > 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")) d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB") > > > 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 I think the labeling above is rather to mislead since what is labeled drugB is actually A&B. I think the method I suggest is more likely to be interpreted correctly: > d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB")) > y <- c(0,1,3) > lm(y ~ trt, data=d2) Call: lm(formula = y ~ trt, data = d2) Coefficients: (Intercept) trtDrugA_drugB trtDrugA_only 2.564e-16 3.000e+00 1.000e+00 -- David. > > 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 <[hidden email]> wrote: > > > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]> 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:[hidden email]] > > Sent: Friday, March 02, 2018 12:32 PM > > To: Ding, Yuan Chun > > Cc: [hidden email] > > 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> 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 <[hidden email]<mailto:[hidden email]>> 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}} > > > > ______________________________________________ > > [hidden email]<mailto:[hidden email]> 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]] > > > > ______________________________________________ > > [hidden email] 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 > > > > > > David Winsemius Alameda, CA, USA 'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law ______________________________________________ [hidden email] 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. |
But of course the whole point of additivity is to decompose the combined
effect as the sum of individual effects. "Mislead" is a subjective judgment, so no comment. The explanation I provided is standard. I used it for decades when I taught in industry. 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 3:00 PM, David Winsemius <[hidden email]> wrote: > > > On Mar 5, 2018, at 2:27 PM, Bert Gunter <[hidden email]> wrote: > > > > 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: > > >> three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug > B, omitting the fourth group of no drugA/yes drugB. > > > > > 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")) > > d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB") > > > > > 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 > > I think the labeling above is rather to mislead since what is labeled > drugB is actually A&B. I think the method I suggest is more likely to be > interpreted correctly: > > > d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB")) > > y <- c(0,1,3) > > lm(y ~ trt, data=d2) > > Call: > lm(formula = y ~ trt, data = d2) > > Coefficients: > (Intercept) trtDrugA_drugB trtDrugA_only > 2.564e-16 3.000e+00 1.000e+00 > > -- > David. > > > > 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 <[hidden email]> > wrote: > > > > > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]> 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:[hidden email]] > > > Sent: Friday, March 02, 2018 12:32 PM > > > To: Ding, Yuan Chun > > > Cc: [hidden email] > > > 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> 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 <[hidden email] > <mailto:[hidden email]>> 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}} > > > > > > ______________________________________________ > > > [hidden email]<mailto:[hidden email]> 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]] > > > > > > ______________________________________________ > > > [hidden email] 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 > > > > > > > > > > > > > > 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]] ______________________________________________ [hidden email] 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. |
In reply to this post by Ding, Yuan Chun
Yuan:
IMHO you need to stop making up your own statistical analyses and get local expert help. I have nothing further to say. Do what you will. 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:44 PM, Ding, Yuan Chun <[hidden email]> wrote: > 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:[hidden email]] > *Sent:* Monday, March 05, 2018 2:27 PM > *To:* David Winsemius > *Cc:* Ding, Yuan Chun; [hidden email] > > *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 <[hidden email]> > wrote: > > > > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]> 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:[hidden email]] > > Sent: Friday, March 02, 2018 12:32 PM > > To: Ding, Yuan Chun > > Cc: [hidden email] > > 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> 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 <[hidden email]<mailto: > [hidden email]>> 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}} > > > > ______________________________________________ > > [hidden email]<mailto:[hidden email]> 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]] > > > > ______________________________________________ > > [hidden email] 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]] ______________________________________________ [hidden email] 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. |
In reply to this post by Bert Gunter-2
> On Mar 5, 2018, at 3:04 PM, Bert Gunter <[hidden email]> wrote: > > But of course the whole point of additivity is to decompose the combined effect as the sum of individual effects. Agreed. Furthermore your encoding of the treatment assignments has the advantage that the default treatment contrast for A+B will have a statistical estimate associated with it. That was a deficiency of my encoding that Ding found problematic. I did have the incorrect notion that the encoding of Drug B in the single drug situation would have been NA and that the `lm`-function would produce nothing useful. Your setup had not occurred to me. Best; David. > > "Mislead" is a subjective judgment, so no comment. The explanation I provided is standard. I used it for decades when I taught in industry. > > 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 3:00 PM, David Winsemius <[hidden email]> wrote: > > > On Mar 5, 2018, at 2:27 PM, Bert Gunter <[hidden email]> wrote: > > > > 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: > > >> three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. > > > > > 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")) > > d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB") > > > > > 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 > > I think the labeling above is rather to mislead since what is labeled drugB is actually A&B. I think the method I suggest is more likely to be interpreted correctly: > > > d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB")) > > y <- c(0,1,3) > > lm(y ~ trt, data=d2) > > Call: > lm(formula = y ~ trt, data = d2) > > Coefficients: > (Intercept) trtDrugA_drugB trtDrugA_only > 2.564e-16 3.000e+00 1.000e+00 > > -- > David. > > > > 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 <[hidden email]> wrote: > > > > > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]> 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:[hidden email]] > > > Sent: Friday, March 02, 2018 12:32 PM > > > To: Ding, Yuan Chun > > > Cc: [hidden email] > > > 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> 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 <[hidden email]<mailto:[hidden email]>> 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}} > > > > > > ______________________________________________ > > > [hidden email]<mailto:[hidden email]> 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]] > > > > > > ______________________________________________ > > > [hidden email] 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 > > > > > > > > > > > > > > David Winsemius > Alameda, CA, USA > > 'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law > > > > > > David Winsemius Alameda, CA, USA 'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law ______________________________________________ [hidden email] 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. |
Thanks a lot, after reading this message, I think I got the advantage of Bert's coding. Those two drugs indeed do not interact with each other, so additive assumption is valid.
I learned a lot today. Thanks again. Ding -----Original Message----- From: David Winsemius [mailto:[hidden email]] Sent: Monday, March 05, 2018 3:55 PM To: Bert Gunter Cc: Ding, Yuan Chun; [hidden email] Subject: Re: [R] data analysis for partial two-by-two factorial design > On Mar 5, 2018, at 3:04 PM, Bert Gunter <[hidden email]> wrote: > > But of course the whole point of additivity is to decompose the combined effect as the sum of individual effects. Agreed. Furthermore your encoding of the treatment assignments has the advantage that the default treatment contrast for A+B will have a statistical estimate associated with it. That was a deficiency of my encoding that Ding found problematic. I did have the incorrect notion that the encoding of Drug B in the single drug situation would have been NA and that the `lm`-function would produce nothing useful. Your setup had not occurred to me. Best; David. > > "Mislead" is a subjective judgment, so no comment. The explanation I provided is standard. I used it for decades when I taught in industry. > > 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 3:00 PM, David Winsemius <[hidden email]> wrote: > > > On Mar 5, 2018, at 2:27 PM, Bert Gunter <[hidden email]> wrote: > > > > 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: > > >> three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. > > > > > 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")) > > d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB") > > > > > 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 > > I think the labeling above is rather to mislead since what is labeled drugB is actually A&B. I think the method I suggest is more likely to be interpreted correctly: > > > d2 <- data.frame(trt = c("Baseline","DrugA_only","DrugA_drugB")) > > y <- c(0,1,3) > > lm(y ~ trt, data=d2) > > Call: > lm(formula = y ~ trt, data = d2) > > Coefficients: > (Intercept) trtDrugA_drugB trtDrugA_only > 2.564e-16 3.000e+00 1.000e+00 > > -- > David. > > > > 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 <[hidden email]> wrote: > > > > > On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <[hidden email]> 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:[hidden email]] > > > Sent: Friday, March 02, 2018 12:32 PM > > > To: Ding, Yuan Chun > > > Cc: [hidden email] > > > 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> 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 <[hidden email]<mailto:[hidden email]>> 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}} > > > > > > ______________________________________________ > > > [hidden email]<mailto:[hidden email]> 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]] > > > > > > ______________________________________________ > > > [hidden email] 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 > > > > > > > > > > > > > > David Winsemius > Alameda, CA, USA > > 'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law > > > > > > David Winsemius Alameda, CA, USA 'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law ______________________________________________ [hidden email] 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. |
Free forum by Nabble | Edit this page |