Repeated Measures Non-Parametric nparLD Pacakge

#1
Hi,

I'm trying to analyze repeated measurements of body temperature data collected from 7 randomly chosen subjects (e.g. turtles). I am using R, along with the nparLD package. I am using Nonparametric Tests for my LD-F2 Design (http://www.inside-r.org/packages/cran/nparLD/docs/ld.f2) because data transformations were unsuccessful and I am missing some paired values in my F2 design.

Main issue/question: In R the (nparLD) ANOVA-type Test showed a significant difference for 1 of 2 fixed effects and no interaction between these main effects. But a post-hoc Wilcoxon Signed-Rank Test did not find significant difference for the fixed effect. I'm not sure how these results are possible together? Also, if I only have two levels of the fixed effect (day vs night), do I need to run a post-hoc test?

Data info:

The repeated measurements on the 7 subjects had 2 fixed effects:

Fixed Effects
1. Diel period (day or night)
2. Season (Spring, summer, and fall)

Mean values for body temperature and for diel period and state are shown in attached file and below. Diel column (D=Day, N = Night). State column (RT=Spring, RF = Summer, PT = Fall). Subject, N=7. NA = missing value.

Code:
> data=read.csv(file.choose(), header=TRUE)
> attach(data)
> data
  stp diel state subject
1  26.2    D    RT       1
2  26.4    N    RT       1
3  24.1    D    RT       2
4    NA    N    RT       2
5    NA    D    RT       3
6  25.2    N    RT       3
7  27.1    D    RT       4
8  26.5    N    RT       4
9  26.9    D    RT       5
10 27.1    N    RT       5
11 26.2    D    RT       6
12 26.0    N    RT       6
13 26.3    D    RT       7
14 26.7    N    RT       7
15 26.0    D    RF       1
16 26.6    N    RF       1
17 24.2    D    RF       2
18 25.6    N    RF       2
19 25.6    D    RF       3
20 26.6    N    RF       3
21 26.1    D    RF       4
22 26.9    N    RF       4
23 27.2    D    RF       5
24 27.4    N    RF       5
25 26.2    D    RF       6
26 26.7    N    RF       6
27 27.2    D    RF       7
28 27.5    N    RF       7
29 25.0    D    PT       1
30 24.8    N    PT       1
31   NA    D    PT       2
32   NA    N    PT       2
33   NA    D    PT       3
34   NA    N    PT       3
35 26.7    D    PT       4
36 26.9    N    PT       4
37 27.6    D    PT       5
38 27.5    N    PT       5
39 25.2    D    PT       6
40 24.9    N    PT       6
41 27.1    D    PT       7
42 27.0    N    PT       7


>ex.f2<-ld.f2(y=stp, time1=diel, time2=state, subject=subject,
time1.name="Diel", time2.name="State", description=FALSE)

> ex.f2$ANOVA.test
           Statistic       df    p-value
Diel       4.9028447 1.000000 0.02681249
State      0.2332795 1.374320 0.70586274
Diel:State 2.1937783 1.062943 0.13717393
Based on these results, only mean diel body temperatures were analyzed using a Wilcoxon Signed-Rank Test--But the post-hoc paired test found NO difference between day and night body temperature (P = 0.054) was found.


Code:
> detach(data)
> data=read.csv(file.choose(), header=TRUE)
> attach(data)
> data
    day night
1  26.2  26.4
2  26.0  26.6
3  25.0  24.8
4  24.2  25.6
5  25.6  26.6
6  27.1  26.5
7  26.1  26.9
8  26.7  26.9
9  26.9  27.1
10 27.2  27.4
11 27.6  27.5
12 26.2  26.0
13 26.2  26.7
14 25.2  24.9
15 26.3  26.7
16 27.2  27.5
17 27.1  27.0

> library(coin)

> wilcoxsign_test(day ~ night, distribution="exact")

        Exact Wilcoxon-Signed-Rank Test

data:  y by x (neg, pos) 
         stratified by block
Z = -1.9234, p-value = 0.05482
alternative hypothesis: true mu is not equal to 0
How is it possible to have a significant difference for the diel effect, based on a non-parametric ANOVA-type test, but NO significant difference between day and night for the post-hoc Wilcoxon test?

All comments (good and bad) are greatly appreciated!

Thanks,
James
 
Last edited:

trinker

ggplot2orBust
#2
When you're posting code, dataframes or computer output it's helpful to wrap this information in code tags by:
  1. either clicking the pound (#) sign icon or
  2. wrap with [NOPARSE]
    Code:
    some code
    [/NOPARSE]

which produces:
Code:
some code
For more see this (LINK)