-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple variables, single coefficient #163
Comments
1. I would do a 2-degree of freedom test, lrTest(zlmCond, 'condition') to test your null hypothesis. This drops the entire time point term from the model. The test you specified would test if (TP3 + TP2 - 2*TP1) = 0, which is equivalent to testing of (TP2-TP1)/2 + (TP3-TP1)/2 = 0, ie, the average change is zero. This is different from testing if any timepoint is different.
2. You can extract the specific coefficients with coef(zlmCond, 'C') and/or coef(zlmCond, 'D'). If you need to extract other contrasts at the moment you'll have to do the algebra yourself.
… On Jul 20, 2021, at 8:55 AM, Kane ***@***.***> wrote:
Hi there authors,
Firstly big fan of MAST, really nice tool.
I am working with 3 categorical time point (TP) conditions: TP1, TP2 and TP3. I am looking for changes in expression across all three timepoints. Namely, H0: the 3 timepoints are identical vs. H1: there is a difference between them. I am essentially trying to replicate what is described here <HelenaLC/muscat#34>.
Having fit the model zlmCond using zlm() with TP1 as the reference variable, I then try to extract data thusly:
lrTest(zlmCond, Hypothesis("conditionTP2+conditionTP3")) yields the hurdle P-value
summary(zlmCond, logLik=Hypothesis("conditionTP2+conditionTP3"))$datatable yields the coefficients for conditions TP2 and TP3.
How do I extract a single coefficient for TP2 and TP3 versus TP1 to match the P-value?
I think this is mostly a question about how to extract from the LMlike class so I haven't included more code but I can if needed.
Many thanks,
Kane
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#163>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AALLAHQGKQ52WOO2JHXDAZ3TYVW3XANCNFSM5AVX2PMQ>.
|
Hi Andrew - that's perfect, thank you. I feel like I have a basic understand of models now but getting it into R is still tricky. Thanks again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there authors,
Firstly big fan of MAST, really nice tool.
I am working with 3 categorical time point (TP) conditions: TP1, TP2 and TP3. I am looking for changes in expression across all three timepoints. Namely, H0: the 3 timepoints are identical vs. H1: there is a difference between them. I am essentially trying to replicate what is described here.
Having fit the model
zlmCond
usingzlm()
with TP1 as the reference variable, I then try to extract data thusly:conditionTP2
+conditionTP3
")) yields the hurdle P-valueconditionTP2
+conditionTP3
"))$datatable yields the coefficients for conditions TP2 and TP3.How do I extract a single coefficient for TP2 and TP3 versus TP1 to match the P-value?
I think this is mostly a question about how to extract from the LMlike class so I haven't included more code but I can if needed.
Many thanks,
Kane
The text was updated successfully, but these errors were encountered: