Skip to content
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

Open
PaulaEterovick opened this issue Aug 22, 2023 · 4 comments
Open

How to include random variables in the formula #83

PaulaEterovick opened this issue Aug 22, 2023 · 4 comments

Comments

@PaulaEterovick
Copy link

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

@mortonjt
Copy link

mortonjt commented Aug 22, 2023 via email

@PaulaEterovick
Copy link
Author

Dear @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

@mortonjt
Copy link

mortonjt commented Aug 22, 2023 via email

@PaulaEterovick
Copy link
Author

Thank you very much, @mortonjt
I am trying to use the model you suggested, but I just found the notebook in https://github.com/gibsramen/BIRDMAn-demo/blob/main/notebooks/custom_model_lme.ipynb as reference and I am missing something while specifying the variables (as the example is set for a variable with just two states and all individuals have samples from each). I have PCR replicates that work like this (two per individual), however what I really want to compare is not the PCR replicates, but either two variables (with 3 and 5 states) or the combination of both (with 15 states).
Is there a notebook somewhere with an example that would be closer to my data? If not, is it feasible to tell me what cells need to be adjusted and how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants