0
$\begingroup$

I have two models which will be used for prediction. The predictor variable zq65 has very different summary results for Pr(>|t|), depending on the inclusion of an interaction term in the model.

Is this unusual to have Pr(>|t|) change so much (0.969479 vs. 0.06721), with the addition of another predictor (i.e., I(zmean*zpcum5))?

zpcum5 has a negative (-0.552) correlation with the data, so maybe I shouldn't be combining this with zmean which has a positive (0.800) correlation? As you can see, I'm not sure how to proceed.

# -----------------------------------------------------------------------------------------------
fmla_sqrtf  <- as.formula("plotVol_sqrt   ~ zmean + zq65 + zpcum5 + I(zmean*zpcum5) + mc20210624 * mc20210425")
fmla_sqrtj  <- as.formula("plotVol_sqrt   ~ zmean + zq65 + zpcum5                   + mc20210624 * mc20210425")

Lm2_sqrtf <- lm(fmla_sqrtf, data = lidarDataSubset_B)
Lm2_sqrtj <- lm(fmla_sqrtj, data = lidarDataSubset_B)
# -----------------------------------------------------------------------------------------------



# -----------------------------------------------------------------------------------------------
# summary result for Lm2_sqrtf
# -----------------------------------------------------------------------------------------------
> summary(Lm2_sqrtf)

Call:
lm(formula = fmla_sqrtf, data = lidarDataSubset_B)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.7570 -1.1558  0.1995  1.2259  4.9739 

Coefficients:
                        Estimate Std. Error t value Pr(>|t|)    
(Intercept)           -29.373843  18.350664  -1.601 0.110469    
zmean                   0.992839   0.278693   3.562 0.000426 ***
zq65                    0.009464   0.247136   0.038 0.969479    
zpcum5                 -0.054502   0.015291  -3.564 0.000423 ***
I(zmean * zpcum5)       0.006974   0.002002   3.483 0.000568 ***
mc20210624             27.012833  20.034941   1.348 0.178557    
mc20210425             64.169975  27.869473   2.303 0.021972 *  
mc20210624:mc20210425 -59.130015  30.287534  -1.952 0.051810 .  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.807 on 308 degrees of freedom
Multiple R-squared:  0.7886,    Adjusted R-squared:  0.7838 
F-statistic: 164.2 on 7 and 308 DF,  p-value: < 2.2e-16
# -----------------------------------------------------------------------------------------------



# -----------------------------------------------------------------------------------------------
# summary result for Lm2_sqrtj
# -----------------------------------------------------------------------------------------------
> summary(Lm2_sqrtj)

Call:
lm(formula = fmla_sqrtj, data = lidarDataSubset_B)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.6753 -1.1852  0.1644  1.2388  5.2397 

Coefficients:
                        Estimate Std. Error t value Pr(>|t|)   
(Intercept)           -24.777054  18.629852  -1.330  0.18451   
zmean                   0.772571   0.276266   2.796  0.00549 **
zq65                    0.409188   0.222777   1.837  0.06721 . 
zpcum5                 -0.007396   0.007260  -1.019  0.30912   
mc20210624             19.686892  20.279864   0.971  0.33243   
mc20210425             53.435600  28.192944   1.895  0.05898 . 
mc20210624:mc20210425 -46.913907  30.620744  -1.532  0.12652   
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.839 on 309 degrees of freedom
Multiple R-squared:  0.7803,    Adjusted R-squared:  0.776 
F-statistic: 182.9 on 6 and 309 DF,  p-value: < 2.2e-16
# -----------------------------------------------------------------------------------------------
$\endgroup$
5
  • $\begingroup$ "zpcum5 has a negative (-0.552) correlation with the data" - "the data" means what? "(0.969479 vs. 0.06721), with the addition of another predictor (i.e., I(zmean zpcum5))?" If I see things correctly, the larger p-value is with the interaction and the smaller without, right? $\endgroup$ Jan 17 at 17:19
  • 1
    $\begingroup$ Yes, it is usual. That's the main point of considering interactions: they can make a difference. $\endgroup$
    – whuber
    Jan 17 at 17:33
  • $\begingroup$ @ChristianHennig ... the data is volume (square root actually) for a forest plot. yes, the larger p-value is the model that has the interaction. Ideally, I would want to use zmean, zq65, and zpcum5 because each represent a different 'dimension' of the lidar's metrics in a forest plot. But it looks like, for prediction, it's better to drop one. $\endgroup$
    – Ray J
    Jan 17 at 17:41
  • $\begingroup$ okay thanks @whuber. I think, for this data, the interaction is important so would take precedence. The big change threw me, but I guess it just means that even though zq65 has a correlation with volume of 0.800 as well, it doesn't contribute to the first model. $\endgroup$
    – Ray J
    Jan 17 at 17:51
  • 1
    $\begingroup$ You could do some cross-validation to compare the prediction performance of the models. $\endgroup$ Jan 17 at 17:53

1 Answer 1

2
$\begingroup$

It seems there is a strong interaction between zmean and zpcum5. I'd suspect zq65 is strongly correlated with the interaction term, so that it is not needed if the interaction is there, but if it isn't, its role is "taken over" by zq65. This is by no means impossible.

Why not just proceed with the model with interaction?

$\endgroup$
3
  • $\begingroup$ thanks @ChristianHennig, I will proceed with the model with the interaction. Would it be okay to drop zq65 with the high p value then? $\endgroup$
    – Ray J
    Jan 17 at 17:55
  • $\begingroup$ @RayJ It looks superfluous in the model. However generally people are too keen to throw information away and a large p-value alone is not a good reason. You can check with cross-validation whether leaving it out will likely improve predictive strength. In any case the coefficient is so close to zero that chances are it won't make much of a difference anyway. $\endgroup$ Jan 17 at 18:00
  • $\begingroup$ okay great, I'll follow your answer above, plus work on the cross validation to assess the prediction of the various models. appreciate the help! $\endgroup$
    – Ray J
    Jan 17 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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