Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with repeated measures ANOVA

    Hi all,

    I am working with a dataset of individuals surveyed twice following an intervention in three villages (one received no intervention, one received one intervention, the third received two interventions). Individuals are identified by caseID_num and time of survey (2016 or 2018) is indicated by the TimeSeries variable. The dependent measure, nQ19, is a count of the number of responses selected for Q19, "What ways do you protect yourself?", by each individual. Provided below is an example of the data.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float nQ19 long Village float(caseid_num TimeSeries)
    3 1   1 0
    2 1   1 1
    2 1  10 0
    2 1  10 1
    2 2 102 0
    2 2 102 1
    2 2 103 1
    2 2 103 0
    3 2 104 0
    3 2 104 1
    end
    label values Village village
    label def village 1 "Bugembe", modify
    label def village 2 "Kijinjomi", modify
    The hypothesis is that the mean of nQ19 will be higher for the Villages that received interventions. To test this a one-way repeated measures ANOVA was run and here is the output from STATA

    Code:
    . anova nQ19 Village caseid_num, repeated(Village)
    
                             Number of obs =        380    R-squared     =  0.5531
                             Root MSE      =    1.01177    Adj R-squared =  0.1085
    
                      Source | Partial SS         df         MS        F    Prob>F
                  -----------+----------------------------------------------------
                       Model |  240.70789        189   1.2735867      1.24  0.0668
                             |
                     Village |  2.3333333          2   1.1666667      1.14  0.3221
                  caseid_num |  235.04521        187   1.2569263      1.23  0.0798
                             |
                    Residual |      194.5        190   1.0236842  
                  -----------+----------------------------------------------------
                       Total |  435.20789        379   1.1483058  
    
    
    Between-subjects error term:  caseid_num
                         Levels:  190       (187 df)
         Lowest b.s.e. variable:  caseid_num
    
    Repeated variable: Village
                                              Huynh-Feldt epsilon        =    .
                                              Greenhouse-Geisser epsilon =    .
                                              Box's conservative epsilon =  0.5000
    
                                                ------------ Prob > F ------------
                      Source |     df      F    Regular    H-F      G-G      Box
                  -----------+----------------------------------------------------
                     Village |      2     1.14   0.3221     .        .      0.2884
                    Residual |    190
                  ----------------------------------------------------------------
    
    . 
    end of do-file
    
    . margins Village
    
    Predictive margins                              Number of obs     =        380
    
    Expression   : Linear prediction, predict()
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |     Margin   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         Village |
        Bugembe  |          .  (not estimable)
      Kijinjomi  |          .  (not estimable)
      Kyakabuzi  |          .  (not estimable)
    ------------------------------------------------------------------------------
    I am wondering why the margins and alternative epsilon's are not estimable (except box's conservative) and how to interpret the coefficients and p values for Village and caseid_num. Is two-way repeated measures ANOVA the incorrect analysis for this data?

    Thank you in advance for taking the time to assist.

  • #2
    It looks like you set up your repeated-measures ANOVA model wrong. And you don't need the -repeated()- option. The example below is intended just to illustrate the mechanics of using -anova-. Begin at the "Begin here" comment (the first part of tries to set up a dataset that resembles yours in important ways, based upon your description).

    .ÿversionÿ15.1

    .ÿ
    .ÿclearÿ*

    .ÿsetÿseedÿ`=strreverse("1455668")'

    .ÿ
    .ÿquietlyÿsetÿobsÿ3

    .ÿgenerateÿbyteÿVillageÿ=ÿ_n

    .ÿ
    .ÿquietlyÿexpandÿ`=round(380ÿ/ÿ3)'

    .ÿgenerateÿintÿcaseid_numÿ=ÿ_n

    .ÿ
    .ÿquietlyÿexpandÿ2

    .ÿbysortÿcaseid_num:ÿgenerateÿbyteÿTimeSeriesÿ=ÿ_nÿ-ÿ1

    .ÿ
    .ÿgenerateÿintÿnQ19ÿ=ÿrpoisson(4)ÿ//ÿNotÿknownÿhowÿmanyÿcheck-all-that-applyÿoptionsÿthereÿwere

    .ÿ
    .ÿ*
    .ÿ*ÿBeginÿhere
    .ÿ*
    .ÿpreserve

    .ÿ
    .ÿ//ÿOptionÿ1
    .ÿquietlyÿreshapeÿwideÿnQ19,ÿi(Villageÿcaseid_num)ÿj(TimeSeries)

    .ÿgenerateÿintÿdeltaÿ=ÿnQ191ÿ-ÿnQ190

    .ÿanovaÿdeltaÿVillage

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿÿÿÿ381ÿÿÿÿR-squaredÿÿÿÿÿ=ÿÿ0.0019
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRootÿMSEÿÿÿÿÿÿ=ÿÿÿÿ2.71907ÿÿÿÿAdjÿR-squaredÿ=ÿ-0.0034

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿPartialÿSSÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿÿMSÿÿÿÿÿÿÿÿFÿÿÿÿProb>F
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------+----------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿModelÿ|ÿÿ5.2125984ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ2.6062992ÿÿÿÿÿÿ0.35ÿÿ0.7031
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿVillageÿ|ÿÿ5.2125984ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ2.6062992ÿÿÿÿÿÿ0.35ÿÿ0.7031
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿ2794.6929ÿÿÿÿÿÿÿÿ378ÿÿÿ7.3933675ÿÿ
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-----------+----------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTotalÿ|ÿÿ2799.9055ÿÿÿÿÿÿÿÿ380ÿÿÿ7.3681724ÿÿ

    .ÿ
    .ÿmarginsÿVillage

    AdjustedÿpredictionsÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ381

    Expressionÿÿÿ:ÿLinearÿprediction,ÿpredict()

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿDelta-method
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿMarginÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿVillageÿ|
    ÿÿÿÿÿÿÿÿÿÿ1ÿÿ|ÿÿ-.1023622ÿÿÿ.2412789ÿÿÿÿ-0.42ÿÿÿ0.672ÿÿÿÿ-.5767791ÿÿÿÿ.3720547
    ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.1496063ÿÿÿ.2412789ÿÿÿÿÿ0.62ÿÿÿ0.536ÿÿÿÿ-.3248106ÿÿÿÿ.6240232
    ÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿ-.0944882ÿÿÿ.2412789ÿÿÿÿ-0.39ÿÿÿ0.696ÿÿÿÿ-.5689051ÿÿÿÿ.3799287
    ------------------------------------------------------------------------------

    .ÿ
    .ÿrestore

    .ÿ//ÿOptionÿ2
    .ÿanovaÿnQ19ÿVillageÿ/ÿcaseid_num|VillageÿTimeSeriesÿVillage#TimeSeries,ÿdropemptycells

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿÿÿÿ762ÿÿÿÿR-squaredÿÿÿÿÿ=ÿÿ0.5128
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRootÿMSEÿÿÿÿÿÿ=ÿÿÿÿ1.92268ÿÿÿÿAdjÿR-squaredÿ=ÿÿ0.0192

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSourceÿ|ÿPartialÿSSÿÿÿÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿÿMSÿÿÿÿÿÿÿÿFÿÿÿÿProb>F
    ÿÿÿÿÿÿ-------------------+----------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿModelÿ|ÿÿÿÿÿÿÿ1471ÿÿÿÿÿÿÿÿ383ÿÿÿ3.8407311ÿÿÿÿÿÿ1.04ÿÿ0.3548
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿVillageÿ|ÿÿ6.3858268ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ3.1929134ÿÿÿÿÿÿ0.83ÿÿ0.4388
    ÿÿÿÿÿÿcaseid_num|Villageÿ|ÿÿ1461.9606ÿÿÿÿÿÿÿÿ378ÿÿÿ3.8676207ÿÿ
    ÿÿÿÿÿÿ-------------------+----------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿTimeSeriesÿ|ÿÿ.04724409ÿÿÿÿÿÿÿÿÿÿ1ÿÿÿ.04724409ÿÿÿÿÿÿ0.01ÿÿ0.9101
    ÿÿÿÿÿÿVillage#TimeSeriesÿ|ÿÿ2.6062992ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿ1.3031496ÿÿÿÿÿÿ0.35ÿÿ0.7031
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿ|ÿÿ1397.3465ÿÿÿÿÿÿÿÿ378ÿÿÿ3.6966837ÿÿ
    ÿÿÿÿÿÿ-------------------+----------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTotalÿ|ÿÿ2868.3465ÿÿÿÿÿÿÿÿ761ÿÿÿ3.7691806ÿÿ

    .ÿ
    .ÿmarginsÿVillage,ÿasbalancedÿwithin(TimeSeries)ÿnoatlegendÿpost

    AdjustedÿpredictionsÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ762

    Expressionÿÿÿ:ÿLinearÿprediction,ÿpredict()
    withinÿÿÿÿÿÿÿ:ÿTimeSeries
    Emptyÿcellsÿÿ:ÿreweight

    ------------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿDelta-method
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿMarginÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------------+----------------------------------------------------------------
    TimeSeries#Villageÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0ÿ1ÿÿ|ÿÿÿ4.283465ÿÿÿ.1706099ÿÿÿÿ25.11ÿÿÿ0.000ÿÿÿÿÿ3.948001ÿÿÿÿ4.618928
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0ÿ2ÿÿ|ÿÿÿ3.937008ÿÿÿ.1706099ÿÿÿÿ23.08ÿÿÿ0.000ÿÿÿÿÿ3.601544ÿÿÿÿ4.272471
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0ÿ3ÿÿ|ÿÿÿ4.204724ÿÿÿ.1706099ÿÿÿÿ24.65ÿÿÿ0.000ÿÿÿÿÿ3.869261ÿÿÿÿ4.540188
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ1ÿ1ÿÿ|ÿÿÿ4.181102ÿÿÿ.1706099ÿÿÿÿ24.51ÿÿÿ0.000ÿÿÿÿÿ3.845639ÿÿÿÿ4.516566
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ1ÿ2ÿÿ|ÿÿÿ4.086614ÿÿÿ.1706099ÿÿÿÿ23.95ÿÿÿ0.000ÿÿÿÿÿ3.751151ÿÿÿÿ4.422078
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ1ÿ3ÿÿ|ÿÿÿ4.110236ÿÿÿ.1706099ÿÿÿÿ24.09ÿÿÿ0.000ÿÿÿÿÿ3.774773ÿÿÿÿÿÿ4.4457
    ------------------------------------------------------------------------------------

    .ÿforvaluesÿiÿ=ÿ1/3ÿ{
    ÿÿ2.ÿÿÿÿÿÿÿÿÿlincomÿ_b[1.TimeSeries#`i'.Village]ÿ-ÿ_b[0.TimeSeries#`i'.Village]
    ÿÿ3.ÿ}

    ÿ(ÿ1)ÿÿ-ÿ0bn.TimeSeries#1bn.Villageÿ+ÿ1.TimeSeries#1bn.Villageÿ=ÿ0

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿ(1)ÿ|ÿÿ-.1023622ÿÿÿ.2412789ÿÿÿÿ-0.42ÿÿÿ0.672ÿÿÿÿ-.5767791ÿÿÿÿ.3720547
    ------------------------------------------------------------------------------

    ÿ(ÿ1)ÿÿ-ÿ0bn.TimeSeries#2.Villageÿ+ÿ1.TimeSeries#2.Villageÿ=ÿ0

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿ(1)ÿ|ÿÿÿ.1496063ÿÿÿ.2412789ÿÿÿÿÿ0.62ÿÿÿ0.536ÿÿÿÿ-.3248106ÿÿÿÿ.6240232
    ------------------------------------------------------------------------------

    ÿ(ÿ1)ÿÿ-ÿ0bn.TimeSeries#3.Villageÿ+ÿ1.TimeSeries#3.Villageÿ=ÿ0

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿ(1)ÿ|ÿÿ-.0944882ÿÿÿ.2412789ÿÿÿÿ-0.39ÿÿÿ0.696ÿÿÿÿ-.5689051ÿÿÿÿ.3799287
    ------------------------------------------------------------------------------

    .ÿ
    .ÿexit

    endÿofÿdo-file


    .

    Comment


    • #3
      Thank you for the corrections on the analysis. I am having issues interpreting these results.

      Here is the code I ran:
      Code:
      anova nQ19 Village / caseid_num|Village TimeSeries Village#TimeSeries
      margins Village, asbalanced within(TimeSeries) noatlegend post
      forvalues i = 1/3 {
      lincom _b[1.TimeSeries#`i'.Village] - _b[0.TimeSeries#`i'.Village]
      }
      Here is the result from Stata:
      Code:
      . anova nQ19 Village / caseid_num|Village TimeSeries Village#TimeSeries
      
                               Number of obs =        375    R-squared     =  0.5893
                               Root MSE      =     .95886    Adj R-squared =  0.1561
      
                        Source | Partial SS         df         MS        F    Prob>F
            -------------------+----------------------------------------------------
                         Model |  240.14433        192   1.2507517      1.36  0.0182
                               |
                       Village |  4.1161384          2   2.0580692      1.73  0.1801
            caseid_num|Village |   222.4733        187   1.1896968  
            -------------------+----------------------------------------------------
                    TimeSeries |  11.263836          1   11.263836     12.25  0.0006
            Village#TimeSeries |  2.2778114          2   1.1389057      1.24  0.2922
                               |
                      Residual |    167.333        182   .91941208  
            -------------------+----------------------------------------------------
                         Total |  407.47733        374   1.0895116  
      
      . margins Village, asbalanced within(TimeSeries) noatlegend post
      
      Adjusted predictions                            Number of obs     =        375
      
      Expression   : Linear prediction, predict()
      within       : TimeSeries
      Empty cells  : reweight
      
      ------------------------------------------------------------------------------------
                         |            Delta-method
                         |     Margin   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------------+----------------------------------------------------------------
      TimeSeries#Village |
              0#Bugembe  |   2.134247   .1137747    18.76   0.000      1.90976    2.358734
            0#Kijinjomi  |   2.148148   .1304843    16.46   0.000     1.890692    2.405605
            0#Kyakabuzi  |   2.324486   .1247029    18.64   0.000     2.078437    2.570535
              1#Bugembe  |   2.334247   .1153452    20.24   0.000     2.106661    2.561832
            1#Kijinjomi  |   2.722222   .1304843    20.86   0.000     2.464766    2.979679
            1#Kyakabuzi  |   2.603175    .120805    21.55   0.000     2.364816    2.841533
      ------------------------------------------------------------------------------------
      
      . forvalues i = 1/3 {
        2. lincom _b[1.TimeSeries#`i'.Village] - _b[0.TimeSeries#`i'.Village]
        3. }
      
       ( 1)  - 0bn.TimeSeries#1bn.Village + 1.TimeSeries#1bn.Village = 0
      
      ------------------------------------------------------------------------------
                   |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               (1) |         .2   .1620769     1.23   0.219    -.1197913    .5197913
      ------------------------------------------------------------------------------
      
       ( 1)  - 0bn.TimeSeries#2.Village + 1.TimeSeries#2.Village = 0
      
      ------------------------------------------------------------------------------
                   |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               (1) |   .5740741   .1845327     3.11   0.002     .2099756    .9381725
      ------------------------------------------------------------------------------
      
       ( 1)  - 0bn.TimeSeries#3.Village + 1.TimeSeries#3.Village = 0
      
      ------------------------------------------------------------------------------
                   |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               (1) |   .2786885   .1736222     1.61   0.110    -.0638826    .6212597
      ------------------------------------------------------------------------------
      
      . 
      end of do-file
      What output indicates the effect of Village on the outcome (nQ19) by time of survey?

      Comment


      • #4
        Originally posted by Christopher Tracey View Post
        What output indicates the effect of Village on the outcome (nQ19) by time of survey?
        The village × time interaction term, F(2, 182) = 1.24, P = 0.3.

        Comment


        • #5
          Am I correct in interpreting the margins as just showing the predicted score for nQ19 based on those parameters and that the score for nQ19 is different from 0 for all combinations? And does the lincom output test if the difference between the margins is significant for each village from time 1 to time 0 and could be interpreted as the within village effect of time on nQ19?

          Thank you for your informative responses and patience, I greatly appreciate your assistance!
          Last edited by Christopher Tracey; 31 Jul 2018, 23:00. Reason: Added questions after researching the outputs and topic further

          Comment


          • #6
            Yes. As an aside, resist the temptation to say that the difference between times for Village A is statistically significantly different from zero and that for Village B is not, and therefore you've shown an effect of intervention.

            Comment


            • #7
              Thank you for the link it was a great example, I will be sure not to.

              In the article they hinted that you could take the difference directly using a two sample t-test, in this case, from the lincom results, it would be (.57) - (.2) = .37 for village two compared to village one. From there the standard error would be sqrt(.182+ .162) = .24 and you would do .37/.24 = 1.54 which would not be statistically significant if using 95% confidence two-tailed. Is that the correct logic for determining the significance of the difference between times for different Villages?

              Again, I greatly appreciate your assistance.

              Comment


              • #8
                Pencil and paper is nice, but use lincom. You can set up any kind of linear-combination contrast with lincom, for example, it can be "Is the difference between A and B statistically significantly different from the difference between C and D?" The argument fed to lincom doesn't need to be restricted to only two terms.

                Also, see the help file for contrast for testing hypotheses of interest that can be expressed as linear combinations of regression terms.

                Comment


                • #9
                  Thank you for the response. Hopefully my last set of question, but is this test still considered to be a two way repeated measure ANOVA since the same people are tested at time 0 and time 1, or just a two way ANOVA?

                  I ran the same anova with the repeated option and the output is here:
                  Code:
                  . anova nQ22 Village / caseid_num|Village TimeSeries Village#TimeSeries, repeated(TimeSeries)
                  
                                           Number of obs =        380    R-squared     =  0.4955
                                           Root MSE      =    .976893    Adj R-squared = -0.0225
                  
                                    Source | Partial SS         df         MS        F    Prob>F
                        -------------------+----------------------------------------------------
                                     Model |  175.26846        192   .91285658      0.96  0.6202
                                           |
                                   Village |  2.4448053          2   1.2224027      1.41  0.2471
                        caseid_num|Village |  162.28151        187   .86781556  
                        -------------------+----------------------------------------------------
                                TimeSeries |   3.396706          1    3.396706      3.56  0.0608
                        Village#TimeSeries |  5.9000416          2   2.9500208      3.09  0.0478
                                           |
                                  Residual |  178.45785        187   .95432007  
                        -------------------+----------------------------------------------------
                                     Total |  353.72632        379   .93331482  
                  
                  
                  Between-subjects error term:  caseid_num|Village
                                       Levels:  190       (187 df)
                       Lowest b.s.e. variable:  caseid_num
                       Covariance pooled over:  Village   (for repeated variable)
                  
                  Repeated variable: TimeSeries
                                                            Huynh-Feldt epsilon        =  1.0108
                                                            *Huynh-Feldt epsilon reset to 1.0000
                                                            Greenhouse-Geisser epsilon =  1.0000
                                                            Box's conservative epsilon =  1.0000
                  
                                                              ------------ Prob > F ------------
                                    Source |     df      F    Regular    H-F      G-G      Box
                        -------------------+----------------------------------------------------
                                TimeSeries |      1     3.56   0.0608   0.0608   0.0608   0.0608
                        Village#TimeSeries |      2     3.09   0.0478   0.0478   0.0478   0.0478
                                  Residual |    187
                        ------------------------------------------------------------------------
                  
                  . margins Village, asbalanced within(TimeSeries) noatlegend post
                  
                  Adjusted predictions                            Number of obs     =        380
                  
                  Expression   : Linear prediction, predict()
                  within       : TimeSeries
                  Empty cells  : reweight
                  
                  ------------------------------------------------------------------------------------
                                     |            Delta-method
                                     |     Margin   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  -------------------+----------------------------------------------------------------
                  TimeSeries#Village |
                          0#Bugembe  |   2.273973   .1143367    19.89   0.000     2.048417    2.499528
                        0#Kijinjomi  |   2.759259   .1329383    20.76   0.000     2.497008    3.021511
                        0#Kyakabuzi  |   2.380952    .123077    19.35   0.000     2.138155     2.62375
                          1#Bugembe  |   2.739726   .1143367    23.96   0.000      2.51417    2.965282
                        1#Kijinjomi  |   2.611111   .1329383    19.64   0.000      2.34886    2.873363
                        1#Kyakabuzi  |   2.634921    .123077    21.41   0.000     2.392123    2.877718
                  ------------------------------------------------------------------------------------
                  It seems that the output is identical, does this indicate the first test was a two way repeated ANOVA? Why did it not require the repeated () option?
                  Last edited by Christopher Tracey; 01 Aug 2018, 22:00.

                  Comment


                  • #10
                    Originally posted by Christopher Tracey View Post
                    Thank you for the response. Hopefully my last set of question, but is this test still considered to be a two way repeated measure ANOVA since the same people are tested at time 0 and time 1, or just a two way ANOVA?
                    Originally posted by Christopher Tracey View Post
                    It seems that the output is identical, does this indicate the first test was a two way repeated ANOVA? Why did it not require the repeated () option?
                    I have been looking into the differences, is the repeated measures not necessary because TimeSeries is binary instead of 3+ time points?

                    Comment


                    • #11
                      Yes.

                      Comment

                      Working...
                      X