I have a continuous response variable representing plant disease severity, with values ranging from 0 to 5. The R unique
function shows the following values in my response variable (0.0, 0.5, 1.0, 3.5, 3.0, 2.0, 4.0, 2.5, 5.0). The response variable contains many zeros and is right-skewed, but the zeros are important for my study. I came across the Tweedie distribution, which seems appropriate based on the literature. However, calculating the p and link function parameters seems complex, so I used the gam
package in R to estimate these values. The model estimated a log link function with a p-value of 1.01.
I wish to know if these estimated values are accurate for my response variable? The DHARMa diagnostic test seems fine, but Q-Q plot in the gam
diagnostics suggests issues with the distribution.
Here is the shape of my response variable:
Here is the fitted model:
mod_3 <-
gam(total_severity ~ s(total_rain, k=25) + s(mean_rh, k=25) + s(mean_temp, k=25) + year, family = tw, method = "REML", data = dat_va)
summary(mod_3)
Family: Tweedie(p=1.01)
Link function: log
Formula:
total_severity ~ s(total_rain, k = 25) + s(mean_rh, k = 25) +
s(mean_temp, k = 25) + year
Parametric coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.4686 0.2687 -5.465 1.03e-07 ***
year2017 -1.3534 0.3125 -4.331 2.07e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Approximate significance of smooth terms:
edf Ref.df F p-value
s(total_rain) 2.247 2.591 10.179 2.92e-05 ***
s(mean_rh) 2.458 2.870 3.020 0.029866 *
s(mean_temp) 7.551 8.955 3.246 0.000939 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
R-sq.(adj) = 0.693 Deviance explained = 62.7%
-REML = 102.15 Scale est. = 0.50638 n = 294
Here are diagnostics plots:
Here is output from model testing using simulation based approach from mgcViz
package.
b <- getViz(mod_3, nsim = 100, post = TRUE, unconditiona = TRUE)
check0D(b, trans = function(.y) mean((.y - mean(.y))^4)) + l_hist() + l_vline()
DHARMa tests doesn't significant p values for overdispersion
, zero inflation
or resdiuals
.