Running the analysis (generalized linear mixed models)

  1. First, create a new field that indicates whether the clinical trial has begun. From the menus choose:

    Transform > Compute Variable...

    Figure 1. Compute Variable dialog
    Compute Variable dialog
  2. In the Compute Variable dialog, type after_t as the variable name.
  3. Type (week>0) as the numeric expression and click OK.
    Figure 2. Data Editor, Variable View
    Data Editor, Variable View
  4. 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.
  5. To fit a Poisson loglinear mixed model, from the menus choose:

    Analyze > Mixed Models > Generalized...

    Figure 3. Data Structure tab
    Data Structure tab
  6. Select Patient ID as a subject field.
  7. Click Fields & Effects.
    Figure 4. Target settings
    Target settings
  8. 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.
  9. In the Target Distribution and Relationship (Link) with the Linear Model group, select Loglinear.
  10. Click Fixed Effects.
    Figure 5. Fixed Effects settings
    Fixed Effects settings
  11. On the Fixed Effects settings, confirm that Use custom inputs is selected.
  12. Select after_t and drag to the Main drop zone to create after_t as a main effect.
  13. 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.

  14. Click Random Effects and click Add Block...
    Figure 6. Random Effects Block
    Random Effects Block
  15. In the Random Effect Block dialog, select after_t and drag to the Main drop zone to create after_t as a main effect.
  16. Select Include intercept.
  17. Select patient_id as the Subject combination.
  18. Select Unstructured as the Random effect covariance type.
  19. Click OK.
  20. Click Run.

    Let's also build a simpler model with an intercept-only random effect for comparison.

  21. Recall the Generalized Linear Mixed Models dialog and make sure the Random Effects settings are selected.
  22. Select the random effect block and click Edit Block...
    Figure 7. Random Effects Block
    Random Effects Block
  23. Remove after_t as a main effect.
  24. Click OK.
  25. Click Run.

Next