Modeling Dose-response data in MAST
1
0
Entering edit mode
@eleanorahowe-13569
Last seen 7.3 years ago

It's stated in the MAST intro documentation that it supports a full linear model to support arbitrary comparisons, etc. Does this extend as far as appropriately modeling ordered factors? If we were to analyze dose-response data should we use ordered factors to model those doses? We'd like to test for dose-responsive differential expression of genes. Is there a more appropriate way to model these data?

MAST sc-rnaseq scrnaseq • 1.7k views
ADD COMMENT
0
Entering edit mode
@andrew_mcdavid-11488
Last seen 6 weeks ago
United States

First off, in base R, I have only dabbled with the ordered factor contrasts so don't know them well enough to give reliable advice about how to interpret them. That being said, there are two ways to apply them with MAST.

First, you can set the contrasts attribute to the column of interest:

library(MAST)
data(vbetaFA)
table(colData(vbetaFA)$Time)
#  0   3   6  12 
#  91  94  94 177 
contrasts(colData(vbetaFA)$Time) = 'contr.poly'
zz = zlm(~Time, sca = vbetaFA)
summary(zz)

[Note: AFAIK, you need evenly spaced factor levels for the polynomial contrasts to be interpretable.]

Second, you can use dummy coding, and then cook up whatever contrast you like to test with Hypothesis:

contrasts(colData(vbetaFA)$Time) = 'contr.treatment'
zz = zlm(~Time+0, sca = vbetaFA)
cntr1 = Hypothesis("Time0-Time3")
cntr2 = Hypothesis("2*Time6-Time0-Time3")
lrTest(zz, cntr1)
lrTest(zz, cntr2)

Although testing is relatively easy in this case, there's some functionality missing to easily derive the coefficient estimates.

ADD COMMENT
0
Entering edit mode

Thank you for the reply, Andrew. Since ordered factors don't seem to be used much with MAST, is there another way you might suggest modeling dose-response data? Would it make sense just to use a numeric value?

ADD REPLY
0
Entering edit mode

Our goal is to support any model that you can run with `lm`.  Using the numeric values for your ordered factor corresponds to a very particular model: it will estimate the linear effect of dose.  That is a restriction from the factor model, which allows the mean function to follow *any* effect of dose.  The "ordered factor" contrasts are just one way of parametrizing this unrestricted mean function.

Without knowing your scientific question and experimental design, I can't really say much more. Normally I start with restricted models, that I am sure I understand, and then consider expanding to more general models.

None of what I wrote above is particular to the two-part models that MAST implements, so perhaps your question may not actually lie with MAST in particular? I recommend "Modern Applied Statistics with S" chapter 5 as a good general reference for linear modeling and ANOVA in R.

ADD REPLY

Login before adding your answer.

Traffic: 772 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6