I am an R beginner so I wish I could get some help with
I have 165 subjects and each of them has been measured for drug concentration (continuous variable) and outcome (binary variable Y/N) for 14 days. Drug concentration and outcome data might vary within an individual on different days; while genotype (categorical, 3 groups) is fixed within an individual. I hypothesize drug concentration and genotype would affect outcome. Therefore, I aim to test the effect of intra- or inter-individual drug concentration variability, and genotype on outcome.
I have two models:
glmer1 <- glmer(outcome~genotype+drug concen+(1|patient ID), family="binomial", data=data1) glmer2 <- glmer(outcome~genotype+drug concen+(drug concen|patient ID), family="binomial", data=data1)
My questions are: is
glmer1 testing intra-individual drug concentration variability on outcome? And is
glmer2 testing inter-individual drug concentration variability on outcome? Or any sub-analysis to test my hypothesis?
For genotype, I know it's testing the genetic effects of inter-individual variability on outcome because each patient only has one fixed genotype. However, I don't know how it works for drug concentration.