check_regression {voi} | R Documentation |
Check the fit of a regression model used to estimate EVPPI or EVSI
Description
Produces diagnostic plots and summaries of regression models used to estimate EVPPI or EVSI, mainly in order to check that the residuals have mean zero.
Usage
check_regression(
x,
pars = NULL,
n = NULL,
comparison = 1,
outcome = "costs",
plot = TRUE
)
Arguments
x |
Output from |
pars |
Parameter (or parameter group) whose EVPPI calculation is to be checked.
This should be in the |
n |
Sample size whose EVSI calculation is to be checked.
This should be in the |
comparison |
Only relevant if there are more than two treatments in the decision model.
Different regression models are then used for the comparisons of different treatments
with the baseline treatment.
|
outcome |
|
plot |
If |
Details
For VoI estimation, the key thing we are looking for is that the residuals have mean zero, hence that the mean of the model output is represented well by the regression function of the model input parameters. It should not matter if the variance of the residuals is non-constant, or non-normally distributed.
Models produced with method="gam"
are summarised using gam.check
.
Models produced method="earth"
are summarised using plot.earth
.
For any regression model, if fitted()
and residuals()
methods are defined for those models,
then a histogram of the residuals and a scatterplot of residuals against fitted values is produced.
Value
Where possible, an appropriate statistic is returned that allows the regression
model to be compared with other regression models implemented using the same method
but with different assumptions. For method="gam"
,
this is Akaike's information criterion (AIC).
For method="earth"
, this is the generalised cross-validation statistic
gcv
. Currently not implemented for other methods.
Examples
pars <- c("p_side_effects_t1", "p_side_effects_t2")
evtest <- evppi(chemo_nb, chemo_pars, pars=pars, check=TRUE)
evtest
check_regression(evtest)
## with no interaction term
evtest2 <- evppi(chemo_nb, chemo_pars, pars=pars,
gam_formula="s(p_side_effects_t1)+s(p_side_effects_t2)",
check=TRUE)
evtest2
check_regression(evtest2)
## doesn't make much difference to the estimate
## fit is OK in either case