1 nov 2018

Inhoud

MANOVA

MANOVA

Multivariate analysis of variance. We are looking for the multivariate signal to noise ratio. It is used to measure the effects of an independent variable on two or more dependent variables that measure the same construct.

Independent one-way MANOVA

  • Two or more dependent/outcome variables
  • One independent/predictor variable
    • Two ore more levels/factors

Assumptions

  • Same as ANOVA's
  • Multivariate normality (not in SPSS)
  • Homogeneity of covariance matrices:
    • Box's test
      • p > .05 good
      • p < .05 not good

Example

We will use the data from Field's chapter 16 about behavioural and cognitive neurosis.

Effect of:

  • Cognitive behaviour therapy (CBT)
  • Behaviour therapy (BT)
  • Control

Obsessive compulsive disorder (OCD):

  • Obsession-related behaviours (Actions)
  • Obsession-related cognitions (Thoughts)

Data

Let's load the data and have a look.

Sums of squares

Fist we have to calculate the sums of squares for the model and the error for both variates, actions and thoughts.

Let's first get some of the means we need for our calculations

aggregate(. ~ group, data, function(x) c(mn =mean(x), n=length(x) ))
##                         group actions.mn actions.n thoughts.mn thoughts.n
## 1           Behaviour therapy        3.7      10.0        15.2       10.0
## 2 Cognitive behaviour therapy        4.9      10.0        13.4       10.0
## 3                no treatment        5.0      10.0        15.0       10.0
thoughts = data$thoughts
actions  = data$actions

m.tho = mean(thoughts)
m.act = mean(actions)

n.tho = length(thoughts)
n.act = length(actions)

And more means

cbt.tho = subset(data, group == "Cognitive behaviour therapy", select="thoughts")$thoughts
bet.tho = subset(data, group == "Behaviour therapy",            select="thoughts")$thoughts
con.tho = subset(data, group == "no treatment",              select="thoughts")$thoughts

cbt.act = subset(data, group == "Cognitive behaviour therapy", select="actions")$actions
bet.act = subset(data, group == "Behaviour therapy",            select="actions")$actions
con.act = subset(data, group == "no treatment",              select="actions")$actions
        
n.cbt.tho = length(cbt.tho)
n.bet.tho = length(bet.tho)
n.con.tho = length(con.tho)

n.cbt.act = length(cbt.act)
n.bet.act = length(bet.act)
n.con.act = length(con.act)

m.cbt.tho = mean(cbt.tho)
m.bet.tho = mean(bet.tho)
m.con.tho = mean(con.tho)

m.cbt.act = mean(cbt.act)
m.bet.act = mean(bet.act)
m.con.act = mean(con.act)

\({SS}_{total}\)

Now we can calculate our total sums of squares for both models. This one is easy.

SS.total.tho = var(thoughts) * (n.tho-1)
SS.total.act = var(actions)  * (n.act-1)

SS.total.tho == sum( (thoughts - m.tho)^2 )
## [1] TRUE
SS.total.act == sum( (actions  - m.act)^2 )
## [1] TRUE

\({SS}_{model}\)

And our sums of squares for both models.

\[{SS}_{model} = \sum{n_k(\bar{X}_k-\bar{X})^2}\]

SS.model.tho = sum( n.cbt.tho*( m.cbt.tho - m.tho )^2,
                    n.bet.tho*( m.bet.tho - m.tho )^2,
                    n.con.tho*( m.con.tho - m.tho )^2 )

SS.model.act = sum( n.cbt.act*( m.cbt.act - m.act )^2,
                    n.bet.act*( m.bet.act - m.act )^2,
                    n.con.act*( m.con.act - m.act )^2 )