Question: Modeling Dose-response data in MAST
gravatar for eleanorahowe
2.1 years ago by
eleanorahowe0 wrote:

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?

scrnaseq mast sc-rnaseq • 395 views
ADD COMMENTlink modified 2.1 years ago by Andrew_McDavid190 • written 2.1 years ago by eleanorahowe0
Answer: Modeling Dose-response data in MAST
gravatar for Andrew_McDavid
2.1 years ago by
Andrew_McDavid190 wrote:

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:

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

[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 COMMENTlink written 2.1 years ago by Andrew_McDavid190

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 REPLYlink written 2.1 years ago by eleanorahowe0

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 REPLYlink written 2.1 years ago by Andrew_McDavid190
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 102 users visited in the last hour