## Analysis of Variance Table
## 
## Model 1: weight ~ light + watering + medium
## Model 2: weight ~ (light + watering + medium)^2
##   Res.Df    RSS Df Sum of Sq      F Pr(>F)
## 1     97 23.212                           
## 2     81 18.443 16    4.7695 1.3092 0.2121
## Analysis of Variance Table
## 
## Model 1: weight ~ (light + watering + medium)^2
## Model 2: weight ~ (light + watering + medium)^2 * light
##   Res.Df    RSS Df Sum of Sq      F Pr(>F)
## 1     81 18.443                           
## 2     69 15.148 12    3.2942 1.2504 0.2682

Model selection based on ANOVA

Choose the model with the lowest p-value in the ANOVA test

  1. Comparison between Model 1 and Model 2:
  • Model 1: weight ~ light + watering + medium
  • Model 2: weight ~ (light + watering + medium)^2
  • The p-value obtained from the comparison is 0.2121, surpassing the common significance threshold (e.g., 0.05). This implies that the inclusion of 2-way interactions does not lead to a noteworthy enhancement in model fit. Consequently, Model 1 is favored over Model 2.
  1. Comparison between Model 2 and Model 3:
  • Model 2: weight ~ (light + watering + medium)^2
  • Model 3: weight ~ (light + watering + medium)^2 * light
  • Similarly, the p-value for the comparison is 0.2682, exceeding the 0.05 threshold. This signifies that the addition of the 3-way interaction does not bring about a statistically significant improvement in fit compared to Model 2. Hence, Model 2 is preferred over Model 3.

In summary, based on the ANOVA comparisons, Model 1 is selected over Model 2, and Model 2 is chosen over Model 3. Therefore, Model 1 is the preferred model overall.

Model selection based on AIC and BIC

## AIC:
##  157.5019 165.3507 168.6899
## BIC:
##  181.3875 231.6997 266.8864

The AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion) are both measures used for model selection, with lower values indicating better-fitting models. In your output:

1.AIC:

2.BIC:

In both AIC and BIC, the model with the lower value is preferred. Therefore, based on AIC, Model 1 is preferable, and based on BIC, Model 1 is also preferable.

It’s worth noting that AIC tends to favor more complex models, while BIC penalizes complexity more heavily. In this case, both criteria agree that Model 1 is the better choice.

So, considering ANOVA results and information criteria (AIC and BIC), it seems that Model 1 (main effects only) is the preferred model for your data.

##                           (Intercept)                              lightred 
##                            1.89666667                            1.41166667 
##                            lightgreen                             watering3 
##                            1.02333333                            1.06000000 
##                             watering5                      mediumcottonwool 
##                            1.82000000                           -1.65000000 
##                       mediumnewspaper                         mediumsawdust 
##                           -1.64000000                           -1.79333333 
##                    lightred:watering3                  lightgreen:watering3 
##                           -1.37500000                            0.42833333 
##                    lightred:watering5                  lightgreen:watering5 
##                           -1.28833333                           -0.17333333 
##             lightred:mediumcottonwool           lightgreen:mediumcottonwool 
##                           -1.16500000                           -0.73333333 
##              lightred:mediumnewspaper            lightgreen:mediumnewspaper 
##                           -0.98833333                           -0.48000000 
##                lightred:mediumsawdust              lightgreen:mediumsawdust 
##                           -0.89833333                           -0.30000000 
##            watering3:mediumcottonwool            watering5:mediumcottonwool 
##                            0.24000000                           -0.13666667 
##             watering3:mediumnewspaper             watering5:mediumnewspaper 
##                            0.08000000                           -0.30166667 
##               watering3:mediumsawdust               watering5:mediumsawdust 
##                            0.17000000                           -0.38333333 
##   lightred:watering3:mediumcottonwool lightgreen:watering3:mediumcottonwool 
##                            1.31166667                            0.06500000 
##   lightred:watering5:mediumcottonwool lightgreen:watering5:mediumcottonwool 
##                            1.37166667                            0.56000000 
##    lightred:watering3:mediumnewspaper  lightgreen:watering3:mediumnewspaper 
##                            1.49500000                           -1.01833333 
##    lightred:watering5:mediumnewspaper  lightgreen:watering5:mediumnewspaper 
##                            0.76333333                            0.01833333 
##      lightred:watering3:mediumsawdust    lightgreen:watering3:mediumsawdust 
##                            0.54166667                           -1.05166667 
##      lightred:watering5:mediumsawdust    lightgreen:watering5:mediumsawdust 
##                            1.15166667                            0.05666667
##    1 
## 1.73

Maintaining consistency across other factors, if the traffic signal is red, irrigation occurs threefold, and the substrate is cottonwool, the model forecasts an average weight of around 1.73 grams for the mustard plants.