0
$\begingroup$

I would like to detect group effects (if any) along with statistical confidences. I have a hierarchical data set structured as follows:

Drug Groups
--Patients
-----Meter Readings

  • The Drug Groups consist of Control, Drug1, and Drug2.
  • There are 300 Patients distributed amongst the Drug Groups with unequal sizes (150, 90, 60 respectively).
  • Meter Readings are continuous variables recorded on a daily basis where Patients will have at least 150 such readings, though some have more records than others. There's good reason to expect a reading is correlated with the previous day's.

Pooled all together, Meter Readings aren't normally distributed. Within Drug Group pools, the Meter Readings don't have equal variances and are again not normal.

I've decided to pursue a Bayesian route, since the various frequentist comparison of means tests have constraints on normality and/or equal variance. I'm a Pythonist (and a total ignoramus wrt statistics), so I want to use PyMC3 for the modeling. I've checked out Thomas Wiecki's post on Hierarchical Linear Regression as well as Dan Saber's on Multilevel Logistic Regression, but I'm having some trouble getting started.

My questions:

  1. Is a multilevel model appropriate for my problem set, considering I only have 3 top level groups?
  2. How do I go about modeling the nested structure of my data, specifically between Patient differences and the time-dependency in Meter Readings?
  3. How would I interpret the model results to determine if there are measurable differences due to Drug Groups?
$\endgroup$
0
$\begingroup$

Not sure if you still working on this, but with only 3 groups, you cannot have a 3rd level. Instead, you should have a 2 level model, with meter readings at level 1 and patients at level two. If you specify 2 level 2 variables "drug_1" & "drug_2" then the co-efficients associated with these will tell you about drug effects compared to placebo.

How to actually go about that in pymc3 is also my question, and what brought me to your answer.

BTW, pymc3 has a discourse page here where you'll get better and faster answers to any pymc3 questions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.