2
$\begingroup$

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:

enter image description here

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:

enter image description here

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()

enter image description here

DHARMa tests doesn't significant p values for overdispersion, zero inflation or resdiuals.

enter image description here

enter image description here

enter image description here

$\endgroup$
2
  • $\begingroup$ Before getting to the meat of your question, it might be worth explaining why your "continuous" response variable is always a multiple of one-half. I am assuming that there has been some rounding process in the measurement of an underlying continuous variable, but you don't say. Tell us first why this is occurring. $\endgroup$
    – Ben
    Commented Jun 10, 2023 at 0:38
  • $\begingroup$ You shouldn't be comparing the residuals with Gaussian quantiles (how did you create these plots?), but instead us the simulation methods to generate reference bands or appropriate reference quantiles for comparison. Regardless, why not keep the data on their original ordinal scale and fit a model to that categorical response? $\endgroup$ Commented Jun 12, 2023 at 9:46

1 Answer 1

0
$\begingroup$

GlmmTMB has a new family ordered beta that can handle response variables with values ranging from 0-1 (both inclusive). My response variable ranged from 0-10. Dividing the response variable by 10 gives values ranging from 0-1, which can be modelled using ordered beta distribution, so there is no need for calculating mid-points.

$\endgroup$

Your Answer

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

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