2

I am interested in examining the effect of time on the levels of antibodies and how that relationship in influenced by the interaction of gender and age. This is how I have built my model. I have included a random intercept for repeated measures.

model <- lmer(Antibody ~  Time + (Sex*Age)+ (1|PID), data=metadata)

This is the result

Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: Antibody ~ Time + (Sex * Age) + (1 | PID)
   Data: metadata

     AIC      BIC   logLik deviance df.resid 
   441.0    461.3   -213.5    427.0      128 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.14160 -0.28264 -0.01453  0.26966  2.27572 

Random effects:
 Groups   Name        Variance Std.Dev.
 PID      (Intercept) 1.8039   1.343   
 Residual             0.3003   0.548   
Number of obs: 135, groups:  PID, 95

Fixed effects:
                                                   Estimate Std. Error         df t value Pr(>|t|)    
(Intercept)                                        6.717567   0.263584 134.327633  25.485  < 2e-16 ***
Time                                              -0.013952   0.002131  54.645901  -6.547 2.13e-08 ***
Sex                                                0.740442   0.299279  92.341423   2.474   0.0152 *  
Age                                               -0.101281   0.227621  92.276736  -0.445   0.6574    
Sex.Male:Age                                       0.655921   0.307147  91.570395   2.136   0.0354 * 

How can I interpret this output? Does the significant interaction between males and age mean that older males have higher antibodies for longer? If not how should I formulate the model to test for the impact of the interaction of age and sex on the duration of the antibody?

Thanks in advance

  • 1
    Yes, so the females correspond to the intercept here. That means that the effect of Age is the effect for females only. The interaction then signifies the change in the slope for males. It seems like females have shorter antibodies as they get older while males get longer antibodies. Does that make sense? You can plot the interaction using the package `sjPlot` with the following code `plot_model(model, type = "int", terms = "Sex*Age")` . In the future, you should ask statistical questions on CrossValidated, StackOverflow is more for coding questions. Hope this helps! – sjp Nov 25 '20 at 18:52
  • Thanks so much for your reply and for the suggestions. So Time (months) in our case corresponds to different sampling points. What would this model tell me?`model <- lmer(Antibody~ Time *Sex*Age+ (1|PID), data=metadata)` I think the initial model is just showing me that older males have higher antibody levels but I don't quite understand how I can see how that is influenced by time. Does that make sense. And will post on CrossValidated in the future. Apologies - I'm new to this – Ana Stavrou Nov 26 '20 at 11:45
  • How many time points do you have? – sjp Nov 26 '20 at 15:16
  • 7 when considering the data in months or 84 when looking at the data by days (84 unique sampling days over the 7 month time period). Really, really appreciate your help!! – Ana Stavrou Nov 26 '20 at 15:49
  • here is some useful information about using LMMs to model longitudinal data https://lme4.r-forge.r-project.org/book/Ch4.pdf The 84 days sounds almost more like a time series to me, in which case generalized additive mixed models might be a better option – sjp Nov 27 '20 at 03:16

0 Answers0