-
Notifications
You must be signed in to change notification settings - Fork 5
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
How to include random variables in the formula #83
Comments
Hi, you probably didnt find it because there was no formula. The random
effects were directly specified in the model.
The easiest thing to do is to merge aquarium and PCRreplicate into a single
column and use the negative Binomial lme
https://github.com/biocore/BIRDMAn/blob/main/birdman/templates/negative_binomial_lme.stan
Alternatively you can build your own custom stan model from scratch, which
is more work, but would give you more control over the priors specified
over your two random vars
…On Tue, Aug 22, 2023 at 8:48 AM Paula Cabral Eterovick < ***@***.***> wrote:
Dear @gibsramen <https://github.com/gibsramen> and @mortonjt
<https://github.com/mortonjt>,
I built a formula to look for the effects of two variables likely
affecting tadpole gut microbiome: temperature (with 5 levels) and nitrate
concentration (with three levels), but I also have two random variables
(aquarium and PCRreplicate) that I don't know how to include as random
variables. I see you included random variables in your model in the
original BIRDMAn paper, but I couldn't find the formula anywhere (sorry if
I missed it).
This is my formula at the moment (without the random variables):
formula="C(Temperature, Diff, levels=['18C', '22C', '26C', '28C',
'Fluctuating'])*C(Nitrate, Diff, levels=['control','N50','N100'])"
Thank you very much for the availability to help
Paula
—
Reply to this email directly, view it on GitHub
<#83>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA75VXNFZ4V6EVROPY4L3JLXWRIZ7ANCNFSM6AAAAAA3ZNJGUI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Dear @mortonjt, https://github.com/gibsramen/BIRDMAn-demo/blob/main/notebooks/default_model.ipynb |
Its possible, but it would require understanding the codebase on top of
edits. Youd need to swap out with the NegativeBinomialLME
https://github.com/biocore/BIRDMAn/blob/main/birdman/default_models.py#L249
…On Tue, Aug 22, 2023 at 3:02 PM Paula Cabral Eterovick < ***@***.***> wrote:
Dear @mortonjt <https://github.com/mortonjt>,
Thank you very much for the fast reply.
Unfortunately I have no previous knowledge on programming and I can't
understand how to apply this to my data. I can understand the notebook
interface and I'm using this example for guidance. Is it possible to adapt
it to my variables?
https://github.com/gibsramen/BIRDMAn-demo/blob/main/notebooks/default_model.ipynb
—
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA75VXMRLPFRCANI6JNLJWTXWSUWZANCNFSM6AAAAAA3ZNJGUI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you very much, @mortonjt |
Dear @gibsramen and @mortonjt,
I built a formula to look for the effects of two variables likely affecting tadpole gut microbiome: temperature (with 5 levels) and nitrate concentration (with three levels), but I also have two random variables (aquarium and PCRreplicate) that I don't know how to include as random variables. I see you included random variables in your model in the original BIRDMAn paper, but I couldn't find the formula anywhere (sorry if I missed it).
This is my formula at the moment (without the random variables):
formula="C(Temperature, Diff, levels=['18C', '22C', '26C', '28C', 'Fluctuating'])*C(Nitrate, Diff, levels=['control','N50','N100'])"
Thank you very much for the availability to help
Paula
The text was updated successfully, but these errors were encountered: