This function wraps the regression-based TOST equivalence test inside a bootstrap, extracts and reports the useful quantities, and reports the outcome of the test. The function was written for validating models, and requires paired data points. To use it for this purpose, pass the model predictions as the predictor variable, and the observations (which the predictions are intended to match) as the response variable.
equiv.boot(x, y, alpha = 0.05, b0.ii = 0.25, b1.ii = 0.25, reps = 100,
b0.ii.absolute = FALSE)
A list of length 10, comprising
The effective (non-missing) sample size
The intercept TOST confidence interval
The intercept region of similarity
The proportions of simulations below, within, and above, the intercept region of similarity
The outcome of the test of the null hypothesis of dissimilarity for the intercept (Reject/Not Reject)
The slope TOST confidence interval
The slope region of similarity
The proportions of simulations below, within, and above, the slope region of similarity
The outcome of the test of the null hypothesis of dissimilarity for the slope (Reject/Not Reject)
The corrected alpha for each of the two independent tests.
the predictor variable (commonly predictions)
the response variable (commonly observations)
the size of the test
the half-length of the region of similarity for the intercept, expressed as a proportion of the estimate or in the same units as the estimate (see b0.ii.absolute).
the half-length of the region of similarity for the slope, expressed as a proportion of the estimate.
the number of bootstrap replicates required
option to express b0.ii in the same units as the estimate of the intercept.
Andrew Robinson A.Robinson@ms.unimelb.edu.au
Feedback from Mohammad Al-Ahmadi has been very useful for this function.
In each case, if the two one-sided confidence interval is inside the region of similarity then the null hypothesis of dissimilarity is rejected.
Robinson, A.P., R.A. Duursma, and J.D. Marshall. 2005. A regression-based equivalence test for model validation: shifting the burden of proof. Tree Physiology 25, 903-913.
lm
, boot
, tost
# Approximately reproduces the first row from Table 2 of Robinson et al. (2005)
data(pref.4PG)
equiv.boot(pref.4PG$volinc4PG, pref.4PG$stemvolinc)
Run the code above in your browser using DataLab