0
$\begingroup$

I am trying to fit a model with some pretty sparse data; I cannot collect more data so please refrain from that suggestion. I do not have a large sample size, so I have issues with singularities for complex models. What I have is 25 subjects (ID) each with two Trials (Trial). Trials are of varying duration (Duration), which means that the Behaviors (Grim) vary due to Trial and Duration. I need to control for Duration and Trial, but what I am really interested in is the ID variable and whether the effect of ID remains consistent across trials. That is, are subject scores repeatable while controlling for a duration effect and the mean trial effect. What I think is that I should be testing a slope variable: does the Behavior remain consistent across Trial 1 and 2 within each individual (slope of each individual’s behavior across trials), while acknowledging that Duration of trial has an influence on likelihood of a behavior occurring and that Trial 2 likely has a more muted response in general across all individuals.

I am having trouble parameterizing this in R, though. Essentially, I have n=1 per ID/Trial class with 25 IDs and 2 Trials per ID, since I was only able to run two Trials per ID. I cannot, therefore, run 1 + Trial|ID (Error: number of observations (=50) <= number of random effects (=50) for term (1 + Trial | ID)).

Where I am at, right now, is two run 3 models and then test if they significantly differ with an ANOVA. I am unsure if, though, this gets to the issue at hand.

Here are the three models, the ANOVA, and my rudimentary interpretation:

Models:
m1: Grim ~ Duration + Trial
m2: Grim ~ Duration + Trial + (1 | ID)
m3: Grim ~ Duration + Trial + ID
   npar    AIC    BIC  logLik deviance   Chisq Df Pr(>Chisq)   
m1    4 351.55 359.20 -171.78   343.55                        
m2    5 352.90 362.46 -171.45   342.90  0.6527  1   0.419136   
m3   28 355.98 409.51 -149.99   299.98 42.9183 23   0.007082 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

So, m1 is just the effect of Trial and Duration on the frequency of the Behavior. m2 adds ID as a random effect, and does not significantly differ from model 1. As a random effect, the slope of trials within each individual does not vary when taking Duration into account, right? So this is my model of interest? I also tried m3, which would emphasize between individual effects, yes? That between individual variation do significantly predict Behaviors, indicative of different intercept. Please correct me as needed so that I am modelling my variable of interest. I do know about rptR, but I fear that my data are not robust enough to use it without issues in singularity.

Sincerely,

Alex

$\endgroup$

Your Answer

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

Browse other questions tagged or ask your own question.