Dear Stata Community,

I am running a random intercept model on a longitudinal dataset where I am interested in examining the association between certain protective/risk factors and suicide ideation among a group of psychiatric inpatients. Initially, 500 patients were assessed in 2018 and about 50% of those consented to be followed up at a later time (between 2019 and 2020). My outcome of interest is suicide ideation and my (primary) predictor variable is score on a questionnaire. Below is a list of variables in my dataset:
  1. suicide_ideation (binary; present/absent)
  2. score: score on questionnaire quantifying risk (continuous)
  3. age: (continuous)
  4. sex (binary)
  5. occasion: 1,2
  6. participant id
My research question is: Is the score on the questionnaire that is quantifying risk associated with suicide ideation across the two occasions? I am having a hard time determining what the the linear predictor for the random intercept model should be based on the research question. I've seen in some places that an timexpredictor i.e. occasionxscore interaction term could be included. When is it appropriate to include such an interaction term (i.e. what does this interaction term represent?)

I've run the following models:
Code:
melogit suicide_ideation score || participant_id, or
=> obtained non-significant association
Code:
melogit suicide_ideation score i.occasion
=> obtain non-significant association for either of the predictors
Code:
melogit suicide_ideation c.score##i.occasion
=> intrxn term not signifcant, score-depression association significant, occasion not significant

How can I interpret these varying results and significance outcomes?


Thank you,