0
$\begingroup$

In my dataset, I have to test the effect of humidity on the height of plants. However, we have an extra effect which is nitrate on height. Each plant had a nitrate measurement but we had one group in "wet" category and another in "dry category" for humidity. We also divided our dataset into 6 populations and each population was either in the dry humidity or wet humidity. I want to test if there is an interaction between humidity and nitrate on the response variable height and I get a significant effect for humidity a non-significant effect for nitrate but a significant interaction between them. I used this model:

library(lme4)
library(lmerTest)
Ex <- read.delim("Data_Group_project_2018_-_part_1_-_IMBRSea.txt", header=TRUE)
Ex$population.f= factor(Ex$population)
mixEx <- lmer(height~humidity+nitrate+ nitrate*humidity+(1|population.f:humidity),data=Ex)
anova(mixEx,ddf="Satterthwaite",type=3)
summary(mixEx)

Output:

> library(lme4)
> library(lmerTest)
> Ex<-read.delim("Data_Group_project_2018_-_part_1_-_IMBRSea.txt", header=TRUE)
> Ex$population.f= factor(Ex$population)
> mixEx<- lmer(height~humidity+nitrate+nitrate*humidity+ (1|population.f:humidity),data=Ex)
> anova(mixEx,ddf="Satterthwaite",type=3)
Type III Analysis of Variance Table with Satterthwaite's method
                 Sum Sq Mean Sq NumDF  DenDF  F value    Pr(>F)    
humidity           2930    2930     1  4.654  61.5896  0.000745 ***
nitrate             107     107     1 82.000   2.2478  0.137643    
humidity:nitrate  39426   39426     1 82.000 828.7753 < 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> summary(mixEx)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: height ~ humidity + nitrate + nitrate * humidity + (1 | population.f:humidity)
   Data: Ex

REML criterion at convergence: 610.1

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-2.32743 -0.55914 -0.01613  0.56248  2.91713 

Random effects:
 Groups                Name        Variance Std.Dev.
 population.f:humidity (Intercept) 106.08   10.299  
 Residual                           47.57    6.897  
Number of obs: 90, groups:  population.f:humidity, 6

Fixed effects:
                    Estimate Std. Error       df t value Pr(>|t|)    
(Intercept)          74.9140     6.2680   4.6544  11.952 0.000114 ***
humiditywet         -69.5638     8.8640   4.6538  -7.848 0.000745 ***
nitrate              -6.4867     0.3364  82.0001 -19.284  < 2e-16 ***
humiditywet:nitrate  13.6861     0.4754  82.0002  28.788  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) hmdtyw nitrat
humiditywet -0.707              
nitrate     -0.270  0.191       
hmdtywt:ntr  0.191 -0.270 -0.708

I don't know how to interpret the results. If I remove the humidity: nitrate the humidity is not significant anymore for the height and the variance for the random effect of the population is a bit lower and that of the residual is significantly higher. This means this interaction explains variation in data. But I don't know what to conclude.

> library(lme4)
> library(lmerTest)
> Ex<-read.delim("Data_Group_project_2018_-_part_1_-_IMBRSea.txt", header=TRUE)
> Ex$population.f= factor(Ex$population)
> mixEx<- lmer(height~humidity+nitrate+ (1|population.f:humidity),data=Ex)
> anova(mixEx,ddf="Satterthwaite",type=3)
Type III Analysis of Variance Table with Satterthwaite's method
          Sum Sq Mean Sq NumDF  DenDF F value Pr(>F)
humidity   2.613   2.613     1  4.000  0.0050 0.9470
nitrate  111.914 111.914     1 83.003  0.2144 0.6446
> summary(mixEx)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: height ~ humidity + nitrate + (1 | population.f:humidity)
   Data: Ex

REML criterion at convergence: 810.2

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.63438 -0.92226 -0.00655  0.87698  1.76434 

Random effects:
 Groups                Name        Variance Std.Dev.
 population.f:humidity (Intercept)  72.79    8.532  
 Residual                          522.04   22.848  
Number of obs: 90, groups:  population.f:humidity, 6

Fixed effects:
            Estimate Std. Error      df t value Pr(>|t|)    
(Intercept)  40.3973     7.1835  8.2043   5.624 0.000453 ***
humiditywet  -0.5992     8.4694  4.0000  -0.071 0.946997    
nitrate       0.3646     0.7874 83.0026   0.463 0.644570    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) hmdtyw
humiditywet -0.589       
nitrate     -0.552  0.000
$\endgroup$
  • $\begingroup$ Could you show the results? $\endgroup$ – The Laconic Dec 9 '18 at 17:04
  • $\begingroup$ @TheLaconic yes i edited and added the answers $\endgroup$ – Tamara Bou Chahine Dec 9 '18 at 17:31
0
$\begingroup$

First of all, don't worry so much about significance vs. lack of it. Effect size is key.

Second, once you've established that there is an interaction, you want to include the main effects, regardless of whether one or both is significant or not, or large or not. It is possible to have very small main effects and a very large interaction and have only the model with the interaction make sense. This happens when the relationship of one variable to the DV reverses when the other IV changes.

$\endgroup$
  • $\begingroup$ thank you for your answer. So can i say that humidity has an effect on length? or i can only make a conclusion that the interaction of nitrate and humidity have an effect on length? $\endgroup$ – Tamara Bou Chahine Dec 11 '18 at 14:38
  • $\begingroup$ Any statements that you have about the effect of one independent variable on the dependent variable will be specific to certain levels of the other independent variable. $\endgroup$ – Peter Flom - Reinstate Monica Dec 12 '18 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.