Skip to content

How to include random variables in the formula #83

Description

@PaulaEterovick

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

Activity

  1. mortonjt commented on Aug 22, 2023

    @mortonjt
  2. PaulaEterovick commented on Aug 22, 2023

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

  3. mortonjt commented on Aug 22, 2023

    @mortonjt
  4. PaulaEterovick commented on Aug 23, 2023

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions