MANOVA.RM Returning Inaccurate Averages in Descriptive Statistics

I am having issue with the mult.RM function. I am running a within subjects multivariate ANOVA with two DVs (width and number) and three IVs (niche, class, and position). The within subjects sampling criteria is position. The code is running well and the formula is correct. However, I am finding discrepancies between the average DV's generated by the code's descriptive statistics and the actual averages.
For example:
For, class A , niche d, position 1 the output generates an average of 134.500 for width and 47.000 and for number.
Calculated by hand class A, niche d, position 1 should be an average of 45.3 for width and 107.2 for number.
Where do these descriptive statistics come from? Why are they so different than the actual averages?

Code:

library(MANOVA.RM)
specimen<-EA_MANOVA_for_R$individual
niche<-EA_MANOVA_for_R$light niche
number<-EA_MANOVA_for_R$INL cell Number
width<-EA_MANOVA_for_R$INL Width
class<-EA_MANOVA_for_R$Class
position<-EA_MANOVA_for_R$retinal position
dataset<-data.frame(number, width, class, niche, specimen, position)
fit<-multRM(cbind(width,number)~class * niche * position, data = dataset, subject = "specimen", within = "position")
summary(fit)

Output:
Descriptive:
class niche position n width number
1 A d 1 8 134.500 47.000
2 A d 2 8 159.750 26.375
3 A d 3 8 173.875 35.625
4 A d 4 8 177.875 38.875
5 A d 5 8 172.500 33.250
6 A d 6 8 157.000 45.125
7 A d 7 8 154.500 41.625
8 A d 8 8 147.125 56.875
9 A d 9 8 140.625 43.500
10 A n 1 6 83.167 68.333
11 A n 2 6 107.333 84.333
12 A n 3 6 94.833 91.167
13 A n 4 6 103.833 89.667
14 A n 5 6 94.500 85.167
15 A n 6 6 90.667 90.167
16 A n 7 6 87.833 82.167
17 A n 8 6 94.667 66.833
18 A n 9 6 107.833 86.167
19 R d 1 5 28.000 70.200
20 R d 2 5 46.400 62.800
21 R d 3 5 103.000 31.800
22 R d 4 5 119.400 50.800
23 R d 5 5 150.800 60.000
24 R d 6 5 152.600 50.600
25 R d 7 5 118.800 34.200
26 R d 8 5 52.600 85.000
27 R d 9 5 28.400 90.000
28 R n 1 5 38.400 86.600
29 R n 2 5 47.600 90.200
30 R n 3 5 40.400 89.200
31 R n 4 5 38.000 83.200
32 R n 5 5 42.200 86.200
33 R n 6 5 61.800 86.200
34 R n 7 5 50.200 78.000
35 R n 8 5 27.800 78.200
36 R n 9 5 103.800 87.800

Wald-Type Statistic (WTS):
Test statistic df p-value
class "45.364" "2" "<0.001"
niche "60.965" "2" "<0.001"
class:niche "3.284" "2" "0.194"
position "1082.912" "16" "<0.001"
class:position "274.749" "16" "<0.001"
niche:position "355.759" "16" "<0.001"
class:niche:position "51.304" "16" "<0.001"

modified ANOVA-Type Statistic (MATS):
Test statistic
class 98.118
niche 140.507
class:niche 7.618
position 38.201
class:position 25.225
niche:position 43.245
class:niche:position 15.650

p-values resampling:
paramBS (WTS) paramBS (MATS)
class "0.001" "<0.001"
niche "<0.001" "<0.001"
class:niche "0.282" "0.225"
position "0.017" "0.04"
class:position "0.142" "0.147"
niche:position "0.095" "0.025"
class:niche:position "0.749" "0.396"

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.