Gloria Dalla Costa
Gloria Dalla Costa

Reputation: 397

Multivariate analysis, how to test whether a parameter is different in the two equations?

Let's say I have this multivariate model that is trying to predict number of surgery procedures and number of visits according to number of vets, nurses, diagnostics tests performed and animal's beds:

mod <- lm(cbind(surgery,visit) ~ vet+ nurse+ test+ beds, d)

How do you test whether the parameter for vet is different in the two equations (one with outcome surgery and the other with outcome visit)?

Upvotes: 1

Views: 41

Answers (1)

jay.sf
jay.sf

Reputation: 73014

You may use summary.manova (called by summary(manova(fit))). Example:

fit <- lm(cbind(mpg, am) ~ hp, mtcars)
summary(manova(fit))
#           Df  Pillai approx F num Df den Df    Pr(>F)    
# hp         1 0.67967   30.766      2     29 6.778e-08 ***
# Residuals 30                                             
# ---
# Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

In this case Pillai's trace of hp yields p < .001, thus we reject the null that the difference of hp of both equations is not significant.

Upvotes: 1

Related Questions