1. Home
  2. N1TTEST procedure

N1TTEST procedure

Performs t-tests with data from a set of n-of-1 trial (S.J. Senn & R.W. Payne).

Options

PRINT = string tokens Controls printed output (matchedpairsttest, summarymeasuresttest, subjectsummary); default matc, summ, subj
CIPROBABILITY = scalar Probability for the confidence intervals; default 0.95

Parameters

Y = variates Each of these contains the data values for an analysis
TREATMENTS = pointers Treatment factor for each analysis
SUBJECTS = factors Subject factor for each analysis
CYCLES= factors Cycles factor for each analysis
DIFFERENCE = tables For each Y variate, saves a table classified by SUBJECTS and CYCLES containing the differences between their pairs of treatments
SUMMARY = pointers For each Y variate, saves a pointer containing variates with the within-subject means, standard errors and numbers of observations
TMATCHEDRESULTS = variates Saves a variate containing the test statistic, d.f. and probability value from each matched-pairs t-test
TSUMMARYRESULTS = variates Saves a variate containing the test statistic, d.f. and probability value from each summary-measures t-test

Description

An n-of-1 trial is a medical trial in a single subject to compare two treatments. The design consists of “cycles” of pairs of periods to which the treatments are allocated in one of the two possible orders. For a set of n-of-1 trials, several subjects (or patients) receive cycles of treatments over a sequence of periods.

The Y parameter supplies a variate containing the results of the set of trials. The TREATMENTS parameter supplies a factor specifying the treatment allocations. The SUBJECTS parameter supplies a factor to specify the subjects, and the CYCLES parameter supplies a factor to specify the cycles within each subject.

The PRINT option controls the tests that are done, and the other printed output, with settings:

subjectsummary within-subject mean responses and their standard errors;
summarymeasuresttest t-test of the within-subject mean responses; and
matchedpairsttest matched-pairs t-test, with cycles defining the pairs.

For testing the null-hypothesis that the effect of both treatments are equal for all subjects, it is legitimate to make the cycle the unit of response, since treatment by subject interactions are zero by hypothesis. The matchedpairsttest setting may be chosen to provide this, For the purpose of examining mean treatment effects, allowing that these might differ from subject to subject, the summarymeasuresttest option may be chosen.

The CIPROBABILITY option specifies the probability for the confidence interval for the T-statistics; default 0.95. option specifies the probability for the confidence interval for the T-statistics; default 0.95.

The DIFFERENCES parameter can save a table classified by SUBJECTS and CYCLES containing the differences between their pairs of treatments. The SUMMARY parameter can save a pointer containing variates with the within-subject means, standard errors and numbers of observations. The TMATCHEDRESULTS parameter can save a variate containing the test statistic, d.f. and probability value from the matched-pairs t-test. Finally, the TSUMMARYRESULTS parameter can save a variate containing the test statistic, d.f. and probability value from the summary-measures t-test.

Acknowledgements: this research was started when working on the European Union’s Seventh Framework Programme for research, technological development and demonstration under Grant Agreement no. 602552 for the IDEAL project and completed when working on the National Institute for Health and Care Research (NIHR) DIAMOND project. Support from both is gratefully acknowledged as is collaboration with Artur Araujo, Robin Chatters, Andrew Cooke, Liv Hawksworth, Steven Julious and Sonia Leite.

Options: PRINT, CIPROBABILITY

Parameters: Y, TREATMENTS, SUBJECTS, CYCLES, DIFFERENCES, SUMMARY, TMATCHEDRESULTS, TSUMMARYRESULTS

See also

Procedures: N1ANOVAN1DESIGN, N1 PLOT, N1 SIMULATE, TTEST

GenStat Reference Manual 1 Summary section on: Basic and nonparametric statistics.

Example

CAPTION  'N1SIMULATE example'; STYLE=meta 
" Simulated data for a series of n-of-1 trials in asthma for which
  two bronchodilators, A and B are given in a single dose with each
  period of treatment well separated by washout. Forced expiratory volume
  in one second (FEV1) has been measure in mL 12 hours after treatments.
  Twelve patients have each been treated in three cycles. "    

SPLOAD     '%data%/N1asthma.gsh'

PDESIGN    [BLOCKSTRUCTURE=Patient/Cycle; TREATMENTS=Treatment,FEV1]
" t-test "

N1TEST      FEV1; Subjects=Patient; Treatments=Treatment; Cycles=Cycle
Updated on April 8, 2024

Was this article helpful?