|
The data for this example are taken from a paper by McKnight and Van Den Eeden (1993), who reported on the number of headaches in a two treatment, multiple period crossover trial. Specifically, the number of headaches per week was repeatedly measured for 27 patients. Following a seven-day placebo run-in period, subjects received either aspartame or placebo in four seven-day treatment periods according to the double-blind crossover treatment design. Each treatment period was separated by a washout day. The sample size is 122. Data for the first 10 observations of all the variables used in this section are shown below in the form of a SuperMix spreadsheet window for aspart.ss3.

The variables of interest are:
- ID is the patient ID (27 patients in total).
- HeadAche is the number of headaches during the week (from 0 to 7).
- Period1 is a period 1 treatment indicator (1 for the first treatment period and 0 otherwise).
- Period2 is a period 2 treatment indicator (1 for the second treatment period and 0 otherwise).
- Period3 is a period 3 treatment indicator (1 for the third treatment period and 0 otherwise).
- Period4 is a period 4 treatment indicator (1 for the fourth treatment period and 0 otherwise).
- DrugAsp indicates the type of drug being used for the treatment, (0 = placebo and 1 = aspartame). 75 observations used placebo and 47 used aspartame.
- Nperiods is the number of periods the individual was observed (from 2 to 5).
- NTDays is the number of treatment days in the period (from 1 to 7).

A general two-level Poisson regression model
for a count response variable
depending on a set of
predictors may be expressed as
where denotes the value of for the -th level-1 unit nested within the th level-2 unit for and , the scalar product is the fixed part of the model
, and denotes the random part of the model
at level 2. For the fixed part of the model, is a typical row of the design matrix while the vector contains the fixed, but unknown parameters to be estimated. In the case of the random part of the model at level 2, represents a typical row of the design matrix, and the vector of random level-2 effects
to be estimated.
The specific Poisson regression model with a random intercept for the number of headaches may be expressed as
where denotes the mean number of headaches of patient for treatment period ;
, ,
and denote the values of the dummy variables Period1, Period2, Period3 and Period4 for patient for treatment period respectively; denotes the value of the DrugAsp for patient for treatment period ;
,
,
,
,
and denote unknown parameters; and denotes the random intercept for patient for and . This model is fitted to the data in aspart.ss3 as follows.

Preparing the data
The first step is to create the ss3 file, aspart.ss3, from the Excel workbook aspart.xls. This is accomplished as follows:
- Use the Import Data File option on the File menu to load the Open dialog box.
- Browse for the file aspart.xls in the Examples, Count folder.
- Select the file and click on the Open button to open the following SuperMix spreadsheet window for aspart.ss3.
After selecting the File, Save option from the main menu
bar, we are ready to fit the Poisson regression model with a random intercept
for the number of headaches to the data in aspart.ss3.
Setting up the analysis
Start by selecting the New Model Setup option on the File menu to load the Model Setup window. On the Configuration screen we first enter the titles Aspartame Data – Repeated Headaches across Time and random intercept and 5 covariates for the analysis in the Title 1 and Title 2 text boxes respectively. The count outcome variable HeadAche is selected from the Dependent Variable drop-down list box. The Dependent Variable Type drop-down list box is used to indicate that the outcome variable is a count. The variable ID, which defines the levels of the hierarchy, is selected as the Level-2 ID from the Level-2 IDs drop-down list box.
Next, click on the Variables tab to proceed with variable selection. The variables Period1, Period2, Period3, Period4, and DrugAsp are specified as the fixed effects of the model by checking the E check boxes for Period1, Period2, Period3, Period4, and DrugAsp in the Available grid. These actions produce the following Variables screen.
Finally, we enter the number of quadrature points, in this case 20, in the Number of Quadrature Points text box on the Advanced screen as shown below. Also change the Optimization Method to non-adaptive quadrature.
Before we can run the analysis, we have to save the model specifications to file. This is accomplished by using the Save option on the File menu to open a Save Mixed Up Model dialog box. First enter the name aspart1.mum in the File name text box and then click on the Save button to save the file. The analysis is run by selecting the Run option from the Analysis menu. This produces the corresponding output file aspart1.out.

Portions of this output file are shown below.
The output file indicates that there are 27 subjects with 122 observations nested within them. The number of observations per subject varies between 2 and 5.
Following the listing of the starting values
, SuperMix indicates that of the 27 subjects, 2 had response vectors that were non-varying
. Thus, 2 subjects gave identical responses at all time points that they were measured on.
The random-effect standard deviation is estimated as .643, and although a Wald test
rejects the hypothesis that this parameter equals 0, use of the Wald test for testing whether variance parameters equal zero is questionable. Regarding the regression coefficients, all effects are non-significant. The output provides the correlation matrix of the maximum likelihood estimates as shown below.
It is important to realize that these are not the correlations of the variables, but of the parameter estimates. These correlations
can be used to assess collinearity problems in estimation.
Continue to the mixed-effects analysis
with an offset variable.

|