equivalence.xyplot {equivalence} | R Documentation |
Implements regression-based tests of equivalence within lattice graphics.
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 xyplot for more details. |
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.
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.
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])