# Non-parametric tests for repeated measures data

#### han8

##### New Member
Hi,

I'm having difficulty finding an appropriate test for my data.

The experiment is looking at the distance animals have moved from a translocation site over a 12 week period (measured weekly), where animals are divided into 3 treatments (ie. I am looking at whether the different treatments influenced the distance moved). So my dependent, repeated measures variable is 'distance', and my independent variable (between subjects factor) is 'treatment'. My within subjects factor is 'individual'. I also have gender as a factor but if it's easier to analyse without this factor then I can just run the test with only one sex.
The data is not normal (nor would I expect it to be as animals move away from their release site but then reach an asymptote after about 4 weeks) and transformations have not helped, therefore I am looking for a suitable non-parametric test. I've looked at the Friedman test but I have an unbalanced design and some missing values where animals were removed from the experiment part way through.

Any suggestions of tests that I could use would be much appreciated, thank you!

#### Karabiner

##### TS Contributor
There is no non-parametric test for mixed (within-subject factor and between-subject-factor) designs.

Normal distribution of the data is no assumption for ANOVAs, but there are other important assumptions.

How large is your sample size? This is one of the most important informations about a study.

With kind regards

K.

#### han8

##### New Member
My sample size for the three treatments is

Male
T1 n=8
T2 n=8
T3 n=4

Female
T1 n=8
T2 n=7
T3 n=8

or, pooled sexes
T1 n=16
T2 n=15
T3 n=12

The Skillings-Mack test looks the closest to what I need so far but it needs a block design and as I have variable 'n' I don't think it will work.

Thanks

#### han8

##### New Member
So I've done a bit more digging and found the Skillings-Mack package for R but I'm not sure how to get my data into it (and also if my unbalanced design will make it invalid).

The code is:
Ski.Mack(y, groups=NULL, blocks=NULL, simulate.p.value = FALSE, B = 10000)

Arguments

y
Either a numeric vector of data values, or a data matrix. If a matrix is used, columns and rows are correspondent to blocks and treatments (groups), respectively.
groups
A vector containing group (treatment) indices for the corresponding y's which is a vector; this vector can be ignored if y is a matrix. Either a numeric or character vector is accepted.
blocks
A vector containing block indices for the corresponding y's; this vector can be ignored if y is a matrix. Either a numeric or character vector is accepted.
simulate.p.value
If TRUE, an estimated p-value based on the Monte Carlo method is calculated. The default is FALSE.
B
If simulate.p.value = TRUE, the default number of replications is 10,000.

Example
## Skillings and Mack (1981), Table 1 page 173
## Comparison of four methods of assembling a product
B <- rep(c(1,2,3,4,5,6,7,8,9),rep(4,9))
G <- rep(c('A','B','C','D'),9)
y <- c(3.2,4.1,3.8,4.2, 3.1,3.9,3.4,4.0, 4.3,3.5,4.6,4.8,
3.5,3.6,3.9,4.0, 3.6,4.2,3.7,3.9, 4.5,4.7,3.7, NA,
NA ,4.2,3.4,NA , 4.3,4.6,4.4,4.9, 3.5, NA,3.7, 3.9)
Ski.Mack(y,groups = G,blocks = B)

## y is a matrix
maty <- matrix(
c(3.2,4.1,3.8,4.2, 3.1,3.9,3.4,4.0, 4.3,3.5,4.6,4.8,
3.5,3.6,3.9,4.0, 3.6,4.2,3.7,3.9, 4.5,4.7,3.7, NA,
NA ,4.2,3.4,NA , 4.3,4.6,4.4,4.9, 3.5, NA,3.7, 3.9),
ncol=9,byrow=FALSE)
Ski.Mack(maty, simulate.p.value = TRUE, B = 1000)

I can't work out how to make sure it knows that I've got repeated measures on individuals. Thanks!

(information taken from https://cran.r-project.org/web/packages/Skillings.Mack/Skillings.Mack.pdf )

#### Karabiner

##### TS Contributor
T1 n=16
T2 n=15
T3 n=12
You said that some subjects were lost during the 12-weeks period. How many subjects with complete data do you have? And is it necessary to include data on a weekly basis, or could you aggregate the measured distances? Seemingly, you are interested in the distance finally reached, not so much the movements inbetween.

With kind regards

K.