line.cis(y, x, alpha = 0.05, data = NULL, method = "SMA", intercept = TRUE,
V = matrix(0, 2, 2), f.crit = 0)
Confidence intervals are constructed by inverting the standard one-sample tests for elvation and slope (see slope.test and elev.test for more details). Only the primary confidence interval is returned - this is valid as long as it is known a priori that the (standardised) major axis is estimating the true slope rather than the (standardised) minor axis. For SMA, this means that the sign of the true slope needs to be known a priori, and the sample slope must have the same sign as the true slope.
If measurement error is present, it can be corrected for through use of the input argument V, which makes adjustments to the estimated sample variances and covariances then proceeds with the same method of inference. Note, however, that this method is only approximate (see Warton et al in review for more details).
The test assumes the following:
These assumptions can be visually checked by plotting residuals against fitted axis scores, and by constructing a Q-Q plot of residuals against a normal distribution. An appropriate residual variable is y-bx, and for fitted axis scores use x (for linear regression), y+bx (for SMA) or by+x (for MA), where b represents the estimated slope.
slope.test
, elev.test
#load the leaflife data
data(leaflife)
#consider only the low rainfall sites:
leaf.low.rain=leaflife[leaflife$rain=='low',]
#estimate the SMA line for reserve vs coat
line.cis(log10(longev),log10(lma),data=leaf.low.rain)
#produce CI's for MA slope and elevation:
line.cis(log10(longev),log10(lma),data=leaf.low.rain, method='MA')
Run the code above in your browser using DataLab