Description Usage Arguments Details Value Warning Acknowledgements Note Author(s) References See Also Examples
Implements regression-based tests of equivalence within lattice graphics.
1 2 | equivalence.xyplot(formula, alpha, b0.ii, b1.ii,
add.smooth=FALSE, b0.absolute=FALSE, ...)
|
formula |
a formula describing the form of conditioning plot. See
the manual entry for |
alpha |
the size of the test |
b0.ii |
the half-length of the region of similarity for the intercept, can be relative or absolute (see below). |
b1.ii |
the half-length of the region of similarity for the slope. |
add.smooth |
adds a loess smooth to the graph. |
b0.absolute |
is b0.ii in absolute or relative units? |
... |
extra arguments passed on to xyplot |
The graphic created by this function was proposed by Robinson et al. (2005) as a visual summary of the regression-based TOST. At first glance the graph will look messy; interpretation eases with practice. The following points should be noted.
LS line:A black, solid line of best fit is added.
Mean:A grey vertical bar indicates the mean of x and the TOST confidence interval for the intercept.
b0 R.S.:A shaded polygon is the region of similarity of the intercept, to test the model bias.
Test b0:If the grey vertical bar is within the shaded polygon then reject the null hypothesis of dissimilarity. This is a test of bias.
...1 -If the region is too low then the predictions are too low.
...2 -If the region is too high then the predictions are too high.
...3 -If the region is too narrow then the predictions are too variable.
b1 C.I.:A black vertical bar undermeath the grey bar represents a confidence interval for the slope of the line of best fit.
b1 R.S.:Two black dashed lines are added representing the region of similarity.
Test b1:If the black bar is within the angle described by the dashed black lines then the slope of the observed/predicted regression is significantly similar to 1. This is a test of proportionality.
...1 -If the bar is too high then the slope is too high; the model over-predicts the higher observations and under-predicts the lower observations.
...2 -If the bar is too low then the slope is too low; the model underpredicts the higher observations and overpredicts the lower observations (analogous to regression to the mean).
...3 -If the bar is too narrow then the predictions are too variable.
The implementation in Robinson et al. (2005) required shifting so that the predictor has 0 mean. This hack has been removed here so that the basic graph object is a plot of the two variables being compared.
Run for its side effect of producing a lattice plot object.
The accuracy of the output of this function is contingent on the usual regression assumptions, which are not checked here. Caveat emptor! Consider using equiv.boot() for a bootstrap-based solution. Transforming either variable will probably complicate the analysis considerably.
Feedback from Mohammad Al-Ahmadi has been very useful for this function.
This version produces a regression-based TOST for each level of the conditioning factor. There may be an argument for pooling the test across these levels, in which case some prepanel computations will be helpful.
The TOST requires only estimates and standard errors from the data. Therefore the linear model used in the panel function can be replaced by any model that will produce suitable estimates. For example, in applying this function to hierarchical data we have had success using lme() instead.
I'm not entirely convinced that all these lines on one image are a good idea. It's straightforward to remove some, or change the colours. Recommendations for graphics that are visually cleaner are welcome.
Andrew Robinson A.Robinson@ms.unimelb.edu.au
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | data(pref.4PG)
equivalence.xyplot(pref.4PG$stemvolinc ~ pref.4PG$volinc4PG,
alpha=0.05, b0.ii=0.25, b1.ii=0.25, add.smooth=TRUE,
xlab=expression(paste("4PG decadal volume growth (", m^3,
ha^-1, decade^-1, ")", sep="")),
ylab=expression(paste("Measured decadal volume growth (",
m^3, ha^-1, decade^-1, ")", sep="")))
data(pref.LAI)
equivalence.xyplot(pref.LAI$lai.pa ~ pref.LAI$lai.bl,
alpha=0.05, b0.ii=0.25, b1.ii=0.25,
xlab=expression(paste("LAI Beer-Lambert (", m^2, m^-2, ")",
sep="")),
ylab=expression(paste("LAI Ceptometer (", m^2, m^-2, ")",
sep="")))
data(ufc)
ufc.ht <- ufc[!is.na(ufc$Height),]
equivalence.xyplot(ufc.ht$Height.m ~ ufc.ht$Height.m.p,
alpha=0.05, b0.ii=0.1, b1.ii=0.2,
xlab="Predicted height (m)",
ylab="Measured height (m)")
equivalence.xyplot(ufc.ht$Height.m ~ ufc.ht$Height.m.p | ufc.ht$Species,
alpha=0.05, b0.ii=0.1, b1.ii=0.2,
xlab="Predicted height (m)",
ylab="Measured height (m)",
subset=ufc.ht$Species %in%
levels(ufc.ht$Species)[table(ufc.ht$Species)>5])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.