Running the analysis (generalized linear mixed models)
- First, create a new field that indicates whether
the clinical trial has begun. From the menus choose:
- In the Compute Variable dialog, type after_t as the variable name.
- Type (week>0) as the numeric expression and click OK.
- We want the procedure to treat after_t as a covariate, so in the Variable View of the Data Editor, select Scale as the measurement level for after_t.
- To fit a Poisson loglinear mixed model, from
the menus choose:
- Select Patient ID as a subject field.
- Click Fields & Effects.
- On the Target settings, confirm that Number of convulsions is selected as the target. Number of convulsions has a predefined role as a target, so it is automatically selected as the target by default.
- In the Target Distribution and Relationship (Link) with the Linear Model group, select Loglinear.
- Click Fixed Effects.
- On the Fixed Effects settings, confirm that Use custom inputs is selected.
- Select after_t and drag to the Main drop zone to create after_t as a main effect.
- Select Treatment received and after_t and drag to the 2-way drop zone to create Treatment received*after_t as an interaction effect.
The model does not include a main effect for Treatment received because the mean count of epileptic episodes at baseline (prior to treatment) is assumed to be equal in the treatment and control groups.
- Click Random Effects and click Add Block...
- In the Random Effect Block dialog, select after_t and drag to the Main drop zone to create after_t as a main effect.
- Select Include intercept.
- Select patient_id as the Subject combination.
- Select Unstructured as the Random effect covariance type.
- Click OK.
- Click Run.
Let's also build a simpler model with an intercept-only random effect for comparison.
- Recall the Generalized Linear Mixed Models dialog and make sure the Random Effects settings are selected.
- Select the random effect block and click Edit Block...
- Remove after_t as a main effect.
- Click OK.
- Click Run.