0
$\begingroup$

I have a repeated measures dataset with provider-level data (i.e., provider's responds to questionnaires on a scale) and patient outcomes. The providers are nested within clinics and the clinics are nested within regions, and I have four follow-ups up to 24 months (baseline, 6 months, 18 months, 24 months). I am trying to model how well patients do (outcome), with the scores of the providers as the input.

The dataset has over 5000 lines, but here is a sample of what it looks like:

df <- data.frame (patient_outcome= c(46, 80, 63, 63, 40),
                  patient_ID= c(1, 1, 2, 3, 4),   
                  time= c("baseline", "six_months", "baseline", "baseline", "baseline")
                  clinic = c(1, 1, 2, 2, 1),
                  region = c(1, 1, 1, 3, 4),
                  provider_score=c(1, 3, 4, 2, 1))

I tried to run the following multilevel model to model the effect of the provider score on the patient outcome, accounting for nesting by 1) time, 2) clinic, 3) region.

lmer(patient_outcome~ provider_score+(time|clinic)+ (time|region)+
            (time|| patient_ID) , data=df)

However, I keep getting this error message:

Error in eval_f(x, ...) : Downdated VtV is not positive definite

Does anyone have any ideas how I could fix the code?

$\endgroup$
3
  • $\begingroup$ unfortunately not :/ Also my data isn't binomial $\endgroup$ Commented Oct 9, 2022 at 20:11
  • 2
    $\begingroup$ It helps when you explain why the explanations from other questions are not applicable. It is almost literally the same question (different setting but the same issue). $\endgroup$ Commented Oct 9, 2022 at 20:26
  • $\begingroup$ I may be off base here as I've never encountered this error, but I notice you say your clinics are nested within regions (and I assume patients are also nested within clinics?), yet your code treats your random effects as crossed. Maybe this has something to do with it? Shouldn't you use (time|region/clinic/patient_ID)? $\endgroup$
    – Sointu
    Commented Oct 10, 2022 at 8:02

0