1. Home
  2. DREPMEASURES procedure

DREPMEASURES procedure

Plots profiles and differences of profiles for repeated measures data (J.T.N.M. Thissen).

Options

TITLE = text Title for the plots; default *
GROUPS = factors List of one or two factors; one factor gives one plot while a list with two factors gives as many plots as the number of levels of the first factor in the list; must be set
TIMEPOINTS = variate or factor When the DATA parameter is set to a pointer containing a separate variate of observations for each time this can specify the actual time points (otherwise the suffixes of the DATA pointer are used), when there is a single DATA variate this must supply a factor to indicate the time of each observation
DIFFERENCES = string token Can suppress plotting of the differences (no, yes); default no

Parameters

DATA = pointers or variates Data observations either in a pointer to a list of variates (one for each time), or a single variate (with TIMEPOINTS set to a factor indicating the time of each observation)
GROUPMEANS = tables To save the calculated treatment means at each timepoint

Description

A repeated measures experiment is one in which the same set of units, or subjects, is observed at a sequence of times to investigate treatment effects over a period of time.

DREPMEASURES produces high-resolution graphs showing the progress in time of a set of observations. These can be supplied in one of two ways. The first is to set the DATA parameter to a pointer containing a list of variates, each one containing the measurements made on the subjects at one of the successive occasions on which they were observed. The TIMEPOINTS option can then supply a variate to define the time point corresponding to each DATA variate; if TIMEPOINTS is unset, the suffixes of the DATA pointer are used. The second possibility is to supply set DATA to a variate containing the data from all the times. The TIMEPOINTS option must then be set to a factor indicating the time of each observation.

The groupings of the subjects should be specified by one or two factors, and input using the GROUPS option. If one factor is specified, the means of the observations at each level of the factor are plotted in one graph. If two factors are specified several graphs are produced: each graph is a plot of the means of the observations at the various levels of the second factor for a particular level of the first.

The means are calculated with the directive TABULATE. If the data variates contain missing values a warning is printed indicating the possibility of misleading results. (Before using DREPMEASURES the missing values can be estimated using the procedures ANTMVESTIMATE or MULTMISSING.)

If option DIFFERENCES=yes, two plots are produced, beside each other: one of the profiles and one of the differences with the first level. The default setting no gives the plot of the profiles only. Plots of differences can be produced only if the factor has more than one level. The TITLE option can be used to provide a title for the plots.

The calculated means can be saved by specifying parameter GROUPMEANS.

Options: TITLE, GROUPS, TIMEPOINTS, DIFFERENCES.

Parameters: DATA, GROUPMEANS.

Method

Means are calculated with the directive TABULATE. If restricted variates are specified in DATA, procedure SUBSET is used to remove any levels of the factors that are not present in the subset of subjects.

Action with RESTRICT

If DATA is set to a pointer, you can arrange to plot only a subset of the measurements by restricting any of the DATA variates or GROUPS factors. The variate specified by TIMEPOINTS for a DATA pointer must not be restricted. Similarly if DATA is set to a variate, you can restrict either the DATA variate or the GROUPS or TIMEPOINTS factors. If more than one variate or factor is restricted, they must all be restricted to the same set of units.

See also

Commands for: Repeated measurements, Graphics.

Example

CAPTION   'DREPMEASURES example',!t(\
          'Data from Crowder & Hand (1990), Analysis of Repeated Measures,',\
          'page 13, Example 2.3: Blood glucose levels for six volunteer',\
          'subjects recorded after the consumption of a certain test meal',\
          'at 6 different hours of a day.'); STYLE=meta,plain
UNIT      [NVALUES=36]
TEXT      [VALUES= '2am', '6am', '10am', '2pm', '6pm', '10pm'] LabHour
FACTOR    [LABELS= LabHour; VALUES= 6(3, 4, 2, 5, 1, 6)] Hour
FACTOR    [LEVELS=6; VALUES=(1...6)6] Subject
VARIATE   [VALUES= -15, 0, 30...90, 120, 180...420] Minutes
CALCULATE n = NVAL(Minutes)
READ      BloodGlu[1...n]

4.90  4.50  7.84  5.46  5.08  4.32  3.91  3.99  4.15  4.41  *
4.61  4.65  7.90  6.13  4.45  4.17  4.96  4.36  4.26  4.13  *
5.37  5.35  7.94  5.64  5.06  5.49  4.77  4.48  4.39  4.45  *
5.10  5.22  7.20  4.95  4.45  3.88  3.65  4.21   *    4.44  *
5.34  4.91  5.69  8.21  2.97  4.30  4.18  4.93  5.16  5.54  *
5.24  5.04  8.72  4.85  5.57  6.33  4.81  4.55  4.48  5.15  *

4.91  4.18  9.00  9.74  6.95  6.92  4.66  3.45  4.20  4.63  *
4.16  3.42  7.09  6.98  6.13  5.36  6.13  3.67  4.37  4.31  *
4.95  4.40  7.00  7.80  7.78  7.30  5.82  5.14  3.59  4.00  *
3.82  4.00  6.56  6.48  5.66  7.74  4.45  4.07  3.73  3.58  *
3.76  4.70  6.76  4.98  5.02  5.95  4.90  4.79  5.25  5.42  *
4.13  3.95  5.53  8.55  7.09  5.34  5.56  4.23  3.95  4.29  *

4.22  4.92  8.09  6.74  4.30  4.28  4.59  4.49  5.29  4.95  4.34
4.52  4.22  8.46  9.12  7.50  6.02  4.66  4.69  4.26  4.29  4.47
4.47  4.47  7.95  7.21  6.35  5.58  4.57  3.90  3.44  4.18  4.32
4.27  4.33  6.61  6.89  5.64  4.85  4.82  3.82  4.31  3.81  2.92
4.81  4.85  6.08  8.28  5.73  5.68  4.66  4.62  4.85  4.69  4.86
4.61  4.68  6.01  7.35  6.38  6.16  4.41  4.96  4.33  4.54  4.81

4.05  3.78  8.71  7.12  6.17  4.22  4.31  3.15  3.64  3.88  *
3.94  4.14  7.82  8.68  6.22  5.10  5.16  4.38  4.22  4.27  *
4.19  4.22  7.45  8.07  6.84  6.86  4.79  3.87  3.60  4.92  *
4.31  4.45  7.34  6.75  7.55  6.42  5.75  4.56  4.30  3.92  *
4.30  4.71  7.44  7.08  6.30  6.50  4.50  4.36  4.83  4.50  *
4.45  4.12  7.14  5.68  6.07  5.96  5.20  4.83  4.50  4.71  *

5.03  4.99  9.10 10.03  9.20  8.31  7.92  4.86  4.63  3.52  4.17
4.51  4.50  8.74  8.80  7.10  8.20  7.42  5.79  4.85  4.94  2.07
4.87  5.12  6.32  9.48  9.88  6.28  5.58  5.26  4.10  4.25  4.55
4.55  4.44  5.56  8.39  7.85  7.40  6.23  4.59  4.31  3.96  4.05
4.79  4.82  9.29  8.99  8.15  5.71  5.24  4.95  5.06  5.24  4.74
4.33  4.48  8.06  8.49  4.50  7.15  5.91  4.27  4.78   *    5.72

4.60  4.72  9.53 10.02 10.25  9.29  5.45  4.82  4.09  3.52  3.92
4.33  4.10  4.36  6.92  9.06  8.11  5.69  5.91  5.65  4.58  3.79
4.42  4.07  5.48  9.05  8.04  7.19  4.87  5.40  4.35  4.51  4.66
4.38  4.54  8.86 10.01 10.47  9.91  6.11  4.37  3.38  4.02  3.84
5.06  5.04  8.86  9.97  8.45  6.58  4.74  4.28  4.04  4.34  4.35
4.43  4.75  6.95  6.64  7.72  7.03  6.38  5.17  4.71  5.14  5.19
:
DREPMEASURES [TIMEPOINTS=Minutes; GROUPS= Hour] BloodGlu
&            [DIFFERENCES= yes] BloodGlu; GROUPMEANS= MnTab
PRINT        MnTab; DECIMALS= 2; FIELD= 6
DREPMEASURES [TIMEPOINTS=Minutes; GROUPS= Hour, Subject] BloodGlu
RESTRICT     BloodGlu[]; Hour .IN. !T('2am', '6am', '10am')
DREPMEASURES [TIMEPOINTS=Minutes; GROUPS= Hour] BloodGlu
RESTRICT     BloodGlu[]
Updated on March 8, 2019

Was this article helpful?