[R] How to incorporate interaction terms in MRM function of ecodist library?

Hossm_R hossamesapres at gmail.com
Mon Feb 27 20:28:35 CET 2012


Hi,

I'm interested in incorporating some interaction terms between my
explanatory variables (distance matrices in this case) when I'm using the
function MRM of the package ecodist. The function is doing a multiple
regression on distance matrices. I can get the function to work perfectly on
my explanatory matrices by adding a (+) sign as known. However, when I try
to use the (*) sign or (:) between two terms that I'd like to check the
interaction for, I get same results as with just additive model. Is there
something that I do wrong?
Thanks,

*For example: *

> mrm.S10z_A<- MRM(Adis ~ S10z.st+Distance.st, nperm=100)
> mrm.S10z_A
$coef
                    Adis pval
Int          0.553605282 0.06
S10z.st     -0.002587542 0.86
Distance.st  0.028866573 0.07

$r.squared
         R2        pval 
0.004180399 0.060000000 

$F.test
       F   F.pval 
4.634535 0.060000 

> mrm.S10z_A<- MRM(Adis ~ S10z.st*Distance.st, nperm=100)
> mrm.S10z_A
$coef
                    Adis pval
Int          0.553605282 0.05
S10z.st     -0.002587542 0.80
Distance.st  0.028866573 0.07

$r.squared
         R2        pval 
0.004180399 0.050000000 

$F.test
       F   F.pval 
4.634535 0.050000 

> mrm.S10z_A<- MRM(Adis ~ S10z.st:Distance.st, nperm=100)
> mrm.S10z_A
$coef
                    Adis pval
Int          0.553605282 0.05
S10z.st     -0.002587542 0.81
Distance.st  0.028866573 0.11

$r.squared
         R2        pval 
0.004180399 0.050000000 

$F.test
       F   F.pval 
4.634535 0.050000 


--
View this message in context: http://r.789695.n4.nabble.com/How-to-incorporate-interaction-terms-in-MRM-function-of-ecodist-library-tp4425767p4425767.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list