**Instructions**: Complete the following steps.

1. Use the study vignette to answer all of the questions in the following worksheet: Worksheet.rtf

2. Based on the information collected in the worksheet, use the GLIMMPSE software to solve the problem: https://v3.glimmpse.samplesizeshop.org.

3. After you use GLIMMPSE to complete the power and sample size analysis described in the study, you can check your answers by looking at the step-by-step solution guide provided at the end of this page.

## 2.1 Short study description

A longitudinal study with both within- and between-independent sampling unit factors.

## 2.2 Study vignette

This study is a hypothetical replication of the one described in Logan et al., 1995. The study flow diagram is shown in Exhibit 1. Modifications may include changing clustering, treatment design, number of measures, outcomes, predictors, time spacing, and all inputs for the power or sample size analysis, including means, variances, standard deviations, sample sizes, powers, Type I error rates, correlations, covariates and correlations.

**Exhibit 1: A longitudinal randomized controlled clinical trial of a sensory focus intervention on memory of pain.**

Researchers plan to conduct a longitudinal randomized controlled clinical trial in patients who had experienced a root canal. The outcome of interest is the memory of pain. The goal of the study is to determine if dental patients who were instructed to use a sensory focus have a different pattern of long-term memory of pain than participants who did not. Researchers hypothesize that the pattern of memory of pain would be different for those who had the intervention, and those who were in the control group.

The null hypothesis is that the pattern of memory of pain over time would be no different between those who had the intervention, and those who were in the control group. The alternative hypothesis is that the pattern of memory of pain over time would be different for the control group and the intervention group. This is an interaction hypothesis, also known as a between-by-within hypothesis. A picture of an interaction effect is shown in Exhibit 2.

**Exhibit 2: A graph of the possible outcomes over time for the memory of pain trial. The pattern of outcomes over time differs between the two intervention groups, a pattern consistent with time-by-treatment interaction.**

Participants are to be selected and randomly assigned to either the sensory focus intervention or the standard-of-care intervention. An equal number of patients will be assigned to each treatment group. Patients in the intervention group will listen to automated audio instructions to pay close attention only to the physical sensations in their mouths. Patients in the standard-of-care group will listen to automated audio instruction on a neutral topic to control for media and attention effects.

All patients will be queried three times about their memory of pain. They will be asked to describe their memory of pain immediately, at six months,and at twelve months after the root canal and intervention.

In this study, the outcome measure is the memory of pain. The independent sampling unit is the patient. The unit of randomization is the patient. The unit of observation is the memory of pain at each time point. It is expected that the three longitudinal measures over time for each patient will be correlated. It is also expected that each study participant will be independent from other study participants. The between-independent sampling unit factor is treatment.

Treatment has two levels: sensory focus intervention and control treatment. The within-independent sampling unit factor is time. Time has three levels: 0 months, 6 months, and 12 months. It is expected that repeated measurements within each person will be correlated. Gedney, Logan,and Baron (2003) identified predictors of the amount of experienced pain recalled over time. One of the findings was that memory of pain intensity at 1 week and 18 months had a correlation of 0.4. Given the previous research, for this exercise, we assume that the correlation between measures 6 months apart will be 0.5. Also, we assume that the correlation between measures 12 months apart will be 0.4.

Logan, Baron, and Kohout (1995) examined whether sensory focus therapy during a root canal procedure could reduce a patient’s experienced pain. The investigators assessed experienced pain on a 5 point scale both immediately and at one week following the procedure. The standard deviation of the measurements was 0.9. Based on clinical expertise, the investigators speculate that the pattern of means for the two groups will be as shown in Exhibit 3.

**Exhibit 3: Predicted mean outcome for memory of pain score by treatment and time.**

The goal is to calculate a reasonable sample size for the study. The investigators would like to know what the sample size should be for power values of 0.85, 0.90, and 0.95.

## 2.3 Statistical analysis plan

Note: We present two valid ways to analyze the data as examples of what would be written for a grant application. Both are roughly equivalent. Please review the “Choosing the Test” lecture for details on selecting a valid test.

General linear multivariate model: We will fit a general linear multivariate model. The outcome variables will be the three repeated measurements of memory of pain. The predictors will be two indicator variables, which, respectively, take on the value 1 if the person was assigned to sensory focus, and 0 otherwise, and take on the value 1 if the person was assigned to standard-of-care, and 0 otherwise. We will use a Hotelling-Lawley trace statistic to assess the null hypothesis that the pattern of memory of pain over time is no different between those who had the intervention, and those who were in the control group. We will use a Type I error rate of 0.05. This modeling technique assumes no missing data for any person for any of the repeated measurements, and assumes equal error variance, independence of the independent sampling units, finite second moments, and linearity, which means that the outcome could be described as a linear function of the predictors. We will use regression diagnostics and jackknifed studentized residuals to examine the assumptions.

General linear mixed model: We will fit a general linear mixed model. The outcome variables will be the three repeated measurements of memory of pain. The predictors will be two indicator variables, which, respectively, take on the value 1 if the person was assigned to sensory focus, and 0 otherwise, and take on the value 1 if the person was assigned to standard-of-care, and 0 otherwise. We will use a Wald statistic with Kenward-Roger degrees of freedom to assess the null hypothesis that the pattern of memory of pain over time is no different between those who had the intervention, and those who were in the control group. We will use an unstructured covariance matrix, and assume that the variance-covariance matrix of the errors is the same for each person. We will use a Type I error rate of 0.05.

This modeling technique assumes no missing data for any person for any of the repeated measurements, and assumes equal error variance, independence of the independent sampling units, finite second moments, and linearity, which means that the outcome could be described as a linear function of the predictors. We will use regression diagnostics and jackknifed studentized residuals to examine the assumptions.