Code to conduct a MANCOVA in r

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Code to conduct a MANCOVA in r

TomMathies
Hello - After days of searching, I'm unable to find some simple code anywhere (this forum too) for conducting a multivariate analysis of covariance (MANCOVA) in r. An example of by data is below, where sex is the factor and SVL would be the covariate. The rest are dependents. I do not know if this code is for a MANCOVA but its all I've been able to find:

Model_1 <- Anova(lm((Y)~X+covariate))

Also, I'd also like to have code for checking homogeneity of slopes.

Small example block of my data:

Sex SVL HL PL HW HH MO TRL
F 66.78 18.19 13.45 12.49 9.5        12 30.69
F 66.73 20.55 13.28 12.93 10.03 12.09 34.29
F 61.34 19.31 12.35 12.28 9.13        11.69 32.16
F 61.47 17.76 13.48 12.38 10.01 11.55 31.78
F 66.95 19        13.49 12.95 9.98        12.34 29.96
F 59.5        17.08 11.69 11.21 7.75        10.75 29
F 55.34 17.23 11.91 10.77 8.16        10.22 22.56
F 56.79 17.73 11.52 12.11 8.49        10.78 28.04
F 64.02 18.01 12.58 12.73 9.45        12.52 29.92
F 60.31 17.13 12.09 11.98 8.97        11.02 30.16
M 63.05 20.15 13.66 12.93 8.86        12        26.9
M 67.12 23.32 14.14 13.51 9.84        12.6        28.41
M 57.75 18.83 12.74 11.96 9.04        12.03 24.38
M 65.47 21.13 14.2        13.08 9.57        12.02 28.16
M 63.33 22.38 14.46 13.15 10.05 13.54 24.05
M 65.18 21.88 13.81 12.37 9.64        13        24.04
M 70.04 23.98 15.12 13.91 11.04 13.46 28.4
M 59.94 20.31 14.66 13.18 9.95        11.32 24.58
M 58.15 19.11 12.4        12.39 8.67        12.15 26.47
M 63.1       20.42   13.89 13.12 9.98        13.21 28.78

Reply | Threaded
Open this post in threaded view
|

Re: Code to conduct a MANCOVA in r

gerard_jvr
I cannot find anything either! Have you been able to find anything? Or is the lm() function the best option?
Reply | Threaded
Open this post in threaded view
|

Re: Code to conduct a MANCOVA in r

TomMathies
I think I found code on my own but was quite awhile ago. I'll look this weekend and get back to you if I'm successful.

Sent from my iPhone

On Apr 5, 2017, at 10:26 PM, gerard_jvr [via R] <[hidden email]> wrote:

I cannot find anything either! Have you been able to find anything? Or is the lm() function the best option?


If you reply to this email, your message will be added to the discussion below:
http://r.789695.n4.nabble.com/Code-to-conduct-a-MANCOVA-in-r-tp4728012p4731038.html
To unsubscribe from Code to conduct a MANCOVA in r, click here.
NAML