# Re: [R] Test for equality of coefficients in multivariate multiple regression

From: Andrew Robinson <A.Robinson_at_ms.unimelb.edu.au>
Date: Wed 19 Jul 2006 - 11:51:44 EST

Hi Uli,

I suggest that you try to rewrite the model system into a single mixed-effects model, which would allow direct parameterization of the tests that you're interested in. A useful article, which may be overkill for your needs, is:

Hall, D.B. and Clutter, M. (2004). Multivariate multilevel nonlinear mixed effects models for timber yield predictions, Biometrics, 60: 16-24.

See the publications link on Daniel Hall's website:

Cheers

Andrew

On Tue, Jul 18, 2006 at 08:15:12PM +0200, Ulrich Keller wrote:
> Hello,
>
> suppose I have a multivariate multiple regression model such as the
> following:
>
> > DF<-data.frame(x1=rep(c(0,1),each=50),x2=rep(c(0,1),50))
> > tmp<-rnorm(100)
> > DF\$y1<-tmp+DF\$x1*.5+DF\$x2*.3+rnorm(100,0,.5)
> > DF\$y2<-tmp+DF\$x1*.5+DF\$x2*.7+rnorm(100,0,.5)
> > x.mlm<-lm(cbind(y1,y2)~x1+x2,data=DF)
> > coef(x.mlm)
> y1 y2
> (Intercept) 0.07800993 0.2303557
> x1 0.52936947 0.3728513
> x2 0.13853332 0.4604842
>
> How can I test whether x1 and x2 respectively have the same effect on y1
> and y2? In other words, how can I test if coef(x.mlm)[2,1] is
> statistically equal to coef(x.mlm)[2,2] and coef(x.mlm)[3,1] to
> coef(x.mlm)[3,2]? I looked at linear.hypothesis {car} and glh.test
> {gmodels}, but these do not seem the apply to multivariate models.
>
> Uli Keller
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> and provide commented, minimal, self-contained, reproducible code.

```--
Andrew Robinson
Department of Mathematics and Statistics            Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia         Fax: +61-3-8344-4599
Email: a.robinson_at_ms.unimelb.edu.au         http://www.ms.unimelb.edu.au

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help