Repeated measures taken over time - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Repeated measures taken over time

Description:

We may wish to know how big a change there has been from the first time the unit ... For instance, the wear on two brands of automobile tires may be ... – PowerPoint PPT presentation

Number of Views:277
Avg rating:3.0/5.0
Slides: 25
Provided by: imadk
Category:
Tags: big | measures | over | repeated | taken | time | tires

less

Transcript and Presenter's Notes

Title: Repeated measures taken over time


1
Repeated measures taken over time
  • Repeated measures taken over time
  • We assume that we have designed an experiment
    according to one of the standard designs (CRD,
    RCB, Latin Square, Split Plot).
  • For each experimental unit we take a measurement
    of some quantity of interest at time1, time2,
    etc. We want to know the effect of both
    treatments and time on the response. For
    instance, we may wish to know if there is a
    treatment by time interaction.

2
Not all experiments involving time have time as a
repeated measures factor.
  • Suppose we wish to compare two types of packaging
    material that are used for hotdogs, and we wish
    to compare the packaging materials over time.
  • In one experiment, each package is observed at
    one week, two weeks, and three weeks to determine
    whether the color of the hotdogs has changed.
    Time is a repeated measures factor because each
    experimental unit (the package) is measured more
    at three different times.
  • In other experiment, we are interested in the
    bacteria counts of the hotdogs. Some of the
    packages are opened and tested for bacteria at
    one week. Other packages are open and tested for
    bacteria at two weeks. And other packages are
    opened and tested for bacteria at three weeks.
    This is not a repeated measures taken over time
    because each package is measured at only one time.

3
How do we make use of the information obtained
over time?
  • There are many possible answers to this question
    depending on the objectives of the researcher.
  • We may wish to know how big a change there has
    been from the first time the unit is measured
    until the last time. For instance, if we measure
    weights of animals at time1, time2, etc., the
    difference between the first and last time
    readings is just the weight gain.
  • We may wish to know the peak response or the
    maximum reading we get over time. For instance,
    if we give a patient a medicine, we may wish to
    know what is the maximum amount of medicine that
    gets absorbed into the bloodstream.
  • We may wish to know the time at which the
    response hits the maximum. For instance, we may
    measure heart rate over time as a person
    exercises, and we may wish to know how much time
    it takes for the heart rate to reach its maximum
    value.
  • We may wish to compare treatments at each time.
    For instance, we may wish to compare the heights
    of corn plants at week1, week2 ,week3, etc.

4
How do we make use of the information obtained
over time?
  • We may wish to know if the rate of change over
    time is the same or different for the treatments,
    in other words, is there a time by treatment
    interaction. For instance, the wear on two
    brands of automobile tires may be
  • measured at 1000 miles, 2000 miles, etc., and we
    would like to know if one brand wears out faster
    than the other. (Here time is measured in miles
    rather than days or hours).

5
Analysis
  • maximum and the time to reach the maximum as
    response variables. In some cases, the
    information taken over time can be reduced to a
    single meaningful response variable, and then the
    data would be analyzed as appropriate for the
    design in question.
  • For instance, suppose that we assign animals
    randomly to one of two treatments, and we measure
    the weights at time1, time2, and time3. If total
    weight gain is the response of interest, then we
    would take the difference between the weights at
    time3 and time1, and use this as a response
    variable, where the design is completely random.
    In this case, we might form more that one
    response variable, for instance (time3 weight
    time1 weight) or (time3 weight time2 weight),
    or (time2 weight time1 weight).
  • If the maximum response over time, or the time to
    reach the maximum response over time are of
    interest, then we could use the

6
  • In some cases, we may be able to get a
    satisfactory analysis where time is regarded as a
    subplot factor.
  • For instance, suppose we have two packaging
    methods and 10 randomly selected packages for
    each method, and suppose we have a color
    measurement on each package at one week, two
    weeks and three weeks. Here we could consider
    week as the subplot factor, and packaging method
    as the whole plot factor with the whole plot
    design being completely random. The sources of
    variability and degrees of freedom would be
  • Source d.f.
  • Method 1
  • WP Error 18
  • Week 2
  • MethodWeek 2
  • SP Error 36

7
  • The split-model for measurements taken over time
    implies that observations over time within a unit
    have constant correlation. That is the
    correlation between time1 and time2 is the same
    as between time1 and time3, is the same as
    between time2 and time3. This might be o.k. when
    the subplots are randomized, but we cant
    randomly assign time so the split plot model
    may not be appropriate.
  • What can we do to test for treatment effects,
    time effect, and treatment by time interaction
    when time is a repeated measures factor and split
    plot model not appropriate?
  • PROC MIXED allows for several types of
    correlation structures using the REPEATED
    statement
  • PROC GLM allows for a multivariate analysis of
    variance.

8
  • First order autoregressive model.
  • In this model, measurements that are farther
    apart in time are less correlated than
    observations close together in time.
  • If the correlation for observations one unit in
    time apart is r, then for the first order
    autoregressive model the correlation two in time
    units apart is r2, and three units in time apart
    is r3, etc.
  • Again suppose we have 2 packaging methods and 10
    packages per treatment, and we measure each
    package at weeks 1, 2, and 3. Here are the SAS
    statements for the AR(1) model
  • PROC MIXED
  • CLASS PACKAGE METHOD WEEK
  • MODEL RESPONSE METHOD WEEK METHODWEEK/DDFM
    SATTERTH
  • RANDOM PACKAGE(METHOD)
  • REPEATED/ TYPE AR(1) SUB PACKAGE(WEEK)
  • LSMEANS METHOD WEEK METHODWEEK/PDIFF

9
  • If there are convergence problems, it may be that
    PACKAGE(METHOD) is negligible, and could be
    dropped from the statements.
  • Unstructured covariance
  • If we do not want to make any assumptions about
    the correlations we may use an unstructured
    correlation. The statements are the same as
    above except that we would use TYPE UN.
  • GLM analysis.
  • To do this analysis, we must have the different
    measurements on time on the same data line. For
    instance in the packaging problem above, we would
    have the week1, week2, and week3 responses on the
    same data line. Code for the above setup is as
    follows.

10
  • PROC GLM
  • CLASS METHOD
  • MODEL WEEK1 WEEK2 WEEK3 METHOD
  • REPEATED WEEK
  • LSMEANS METHOD WEEK METHODWEEK/STDERR PDIFF
  • Note that WEEK1, WEEK2, etc. (which are
  • names given to the response variables at
    different times) are arbitrary names, and WEEK
    (which is a name given to the time variable) is
    an arbitrary name. For instance we could use W1,
    W2, etc instead of WEEK1, WEEK2, and TIME instead
    of WEEK.
  • The data on the next page are pH measurements
    taken on beef carcasses at 6 different times
    under two different treatments. The measurements
    over time are repeated measures. I show both a
    GLM and a MIXED analysis using the AR(1).

11
  • obs id trt t1 t2 t3
    t4 t5 t6
  • 1 1 1 6.81 6.16 5.92
    5.86 5.80 5.39
  • 2 2 1 6.68 6.30 6.12
    5.71 6.09 5.28
  • 3 3 1 6.34 6.22 5.90
    5.38 5.20 5.46
  • 4 4 1 6.68 6.24 5.83
    5.49 5.37 5.43
  • 5 5 1 6.79 6.28 6.23
    5.85 5.56 5.38
  • 6 6 1 6.85 6.51 5.95
    6.06 6.31 5.39
  • 7 7 2 6.64 5.91 5.59
    5.41 5.24 5.23
  • 8 8 2 6.57 5.89 5.32
    5.41 5.32 5.30
  • 9 9 2 6.84 6.01 5.34
    5.31 5.38 5.45
  • 10 10 2 6.71 5.60 5.29
    5.37 5.26 5.41
  • 11 11 2 6.58 5.63 5.38
    5.44 5.17 5.62
  • 12 12 2 6.68 6.04 5.62
    5.31 5.41 5.44

12
  • The GLM Procedure
  • Class Level
    Information
  • Class
    Levels Values
  • trt
    2 1 2
  • Number of
    observations 12
  • The GLM
    Procedure
  • __________________________________________________
    ________________________________________
  • Dependent Variable t1
  • Sum
    of
  • Source DF
    Squares Mean Square F Value Pr gt F
  • Model 1
    0.00140833 0.00140833 0.06 0.8064
  • Error 10
    0.22228333 0.02222833
  • Corrected Total 11
    0.22369167
  • R-Square Coeff Var
    Root MSE t1 Mean
  • 0.006296 2.231633
    0.149092 6.680833
  • Source DF Type III
    SS Mean Square F Value Pr gt F
  • trt 1
    0.00140833 0.00140833 0.06 0.8064
  • __________________________________________________
    _______________________________________

13
  • Dependent Variable t2
  • Sum
    of
  • Source DF Squares Mean Square
    F Value Pr gt F
  • Model 1 0.57640833 0.57640833
    23.01 0.0007
  • Error 10 0.25048333 0.02504833
  • Corrected Total 11 0.82689167
  • R-Square Coeff Var
    Root MSE t2 Mean
  • 0.697078 2.609149
    0.158267 6.065833
  • Source DF Type III SS Mean
    Square F Value Pr gt F
  • trt 1 0.57640833
    0.57640833 23.01 0.0007
  • __________________________________________________
    __________

14
  • Dependent Variable t3
  • Sum of
  • Source DF Squares Mean Square
    F Value Pr gt F
  • Model 1 0.96900833
    0.96900833 44.37 lt.0001
  • Error 10 0.21841667
    0.02184167
  • Total 11 1.18742500
  • R-Square Coeff Var
    Root MSE t3 Mean
  • 0.816059 2.589387
    0.147789 5.707500
  • Source DF Type III SS Mean Square
    F Value Pr gt F
  • trt 1 0.96900833
    0.96900833 44.37 lt.0001

15
  • Dependent Variable t4
  • Sum
    of
  • Source DF Squares Mean Square
    F Value Pr gt F
  • Model 1 0.36750000
    0.36750000 10.95 0.0079
  • Error 10 0.33570000
    0.03357000
  • Total 11 0.70320000
  • R-Square Coeff Var
    Root MSE t4 Mean
  • 0.522611 3.301282
    0.183221 5.550000
  • Source DF Type III SS Mean
    Square F Value Pr gt F
  • trt 1 0.36750000
    0.36750000 10.95 0.0079
  • __________________________________________________
    ______

16
  • Dependent Variable t5
  • Sum
    of
  • Source DF
    Squares Mean Square F Value Pr gt F
  • Model 1
    0.54187500 0.54187500 5.70 0.0381
  • Error 10
    0.95081667 0.09508167
  • Corrected Total 11
    1.49269167
  • R-Square Coeff Var
    Root MSE t5 Mean
  • 0.363019 5.597092
    0.308353 5.509167
  • Source DF Type III
    SS Mean Square F Value Pr gt F
  • trt 1
    0.54187500 0.54187500 5.70 0.0381
  • __________________________________________________
    _____________

17
  • Dependent Variable t6
  • Sum of
  • Source DF Squares Mean
    Square F Value Pr gt F
  • Model 1 0.00120000
    0.00120000 0.11 0.7477
  • Error 10 0.10976667
    0.01097667
  • Total 11 0.11096667
  • R-Square Coeff Var
    Root MSE t6 Mean
  • 0.010814 1.940777
    0.104770 5.398333
  • Source DF Type III SS
    Mean Square F Value Pr gt F
  • trt 1 0.00120000
    0.00120000 0.11 0.7477
  • __________________________________________________
    _____________

18
  • The GLM Procedure
  • Repeated Measures
    Analysis of Variance
  • Repeated Measures
    Level Information
  • Dependent Variable t1 t2
    t3 t4 t5 t6
  • Level of time 1 2
    3 4 5 6
  • __________________________________________________
    _______________
  • Manova Test Criteria and Exact F
    Statistics for the Hypothesis of no time Effect
  • H Type III SSCP
    Matrix for time
  • E Error
    SSCP Matrix
  • S1
    M1.5 N2
  • Statistic Value
    F Value Num DF Den DF Pr gt F
  • Wilks' Lambda
    0.00700050 170.22 5 6
    lt.0001
  • Pillai's Trace
    0.99299950 170.22 5 6
    lt.0001
  • Hotelling-Lawley Trace 141.84690886
    170.22 5 6 lt.0001
  • Roy's Greatest Root 141.84690886
    170.22 5 6 lt.0001
  • __________________________________________________
    _______________

19
  • Manova Test Criteria and Exact F Statistics for
    the Hypothesis of no timetrt Effect
  • H Type III SSCP
    Matrix for timetrt
  • E Error
    SSCP Matrix
  • S1
    M1.5 N2
  • Statistic Value F
    Value Num DF Den DF Pr gt F
  • Wilks' Lambda 0.18817740 5.18
    5 6 0.0348
  • Pillai's Trace 0.81182260 5.18
    5 6 0.0348
  • Hotelling-L Trace 4.31413429 5.18
    5 6 0.0348
  • Roy's GRoot 4.31413429 5.18
    5 6 0.0348
  • __________________________________________________
    ________

20
  • The GLM Procedure
  • Repeated Measures
    Analysis of Variance
  • Tests of Hypotheses for
    Between Subjects Effects
  • Source F Type III SS Mean
    Square F Value Pr gt F
  • trt 1 1.59013889
    1.59013889 20.37 0.0011
  • Error 10 0.78058889
    0.07805889
  • The GLM
    Procedure
  • Repeated Measures
    Analysis of Variance
  • Univariate Tests of Hypotheses
    for Within Subject Effects


  • Adj Pr gt F
  • Source DF Type III SS Mean Square F
    Value Pr gt F G - G H - F
  • time 5 13.93719444 2.78743889
    106.64 lt.0001 lt.0001 lt.0001
  • timetrt 5 0.86726111 0.17345222
    6.64 lt.0001 0.0020 0.0002
  • Error(time) 50 1.30687778
    0.02613756
  • Greenhouse-Geisser
    Epsilon 0.5538
  • Huynh-Feldt Epsilon
    0.8636
  • __________________________________________________
    _______________

21
  • The Mixed Procedure
  • Model
    Information
  • Data Set
    WORK.TWO
  • Dependent Variable
    ph
  • Covariance Structures
    Variance Components,

  • Autoregressive
  • Subject Effect
    id(trt)
  • Estimation Method
    REML
  • Residual Variance Method
    Profile
  • Fixed Effects SE Method
    Model-Based
  • Degrees of Freedom Method
    Satterthwaite
  • Class Level
    Information
  • Class Levels
    Values
  • trt 2
    1 2
  • time 6 1 2
    3 4 5 6
  • id 12 1
    2 3 4 5 6 7 8 9 10 11 12

22
  • The Mixed Procedure
  • Covariance
    Parameter Estimates
  • Cov Parm
    Subject Estimate
  • id(trt)
    0.008373
  • AR(1)
    id(trt) 0.01935
  • Residual
    0.02635
  • __________________________________________________
    ________
  • Type 3 Tests of
    Fixed Effects
  • Num
    Den
  • Effect DF
    DF F Value Pr gt F
  • trt 1
    9.72 20.53 0.0012
  • time 5
    27.9 104.32 lt.0001
  • trttime 5
    27.9 6.60 0.0004
  • __________________________________________________
    ________

23
  • SAS STATEMENTS FOR PREVIOUS ANALYSIS
  • proc print
  • proc glm
  • class trt
  • model t1 t2 t3 t4 t5 t6 trt
  • repeated time
  • These statements take the time data that are on
    the same line and put them on
  • Separate lines.
  • data two
  • set one
  • ph t1 time 1 output
  • ph t2 time 2 output
  • ph t3 time 3 output
  • ph t4 time 4 output
  • ph t5 time 5 output
  • ph t6 time 6 output
  • run

24
  • proc mixed
  • class trt time id
  • model ph trt time trttime/ddfm satterth
  • random id(trt)
  • repeated/ type ar(1) sub id(trt)
  • run
Write a Comment
User Comments (0)
About PowerShow.com