Learn R Programming

smatr (version 3.4-8)

smatr-package: (Standardised) Major Axis Estimation and Testing Routines

Description

This package provides methods of fitting bivariate lines in allometry using the major axis (MA) or standardised major axis (SMA), and for making inferences about such lines. The available methods of inference include confidence intervals and one-sample tests for slope and elevation, testing for a common slope or elevation amongst several allometric lines, constructing a confidence interval for a common slope or elevation, and testing for no shift along a common axis, amongst several samples.

Arguments

Details

The key functions in this package are sma and ma, which will fit SMA and MA respectively, and construct confidence intervals or test hypotheses about slope or elevation in one or several samples, depending on how the arguments are used.

For example:

sma(y~x) will fit a SMA for y vs x, and report confidence intervals for the slope and elevation.

sma(y~x, robust=T) will fit a robust SMA for y vs x using Huber's M estimation, and will report (approximate) confidence intervals for the slope and elevation.

ma(y~x*groups-1) will fit MA lines for y vs x that are forced through the origin, where a separate MA is fitted to each of several samples as specified by the argument groups. It will also report results from a test of the hypothesis that the true MA slope is equal across all samples.

For more details, see the help listings for sma and ma.

Note that the sma and ma functions replace the functions given in earlier package versions as line.cis, slope.test, elev.test, slope.com, elev.com and shift.com, although all of these functions and their help entries are still available.

All procedures have the option of correcting for measurement error, although only in an approximate fashion, valid in large samples.

Additional features of this package are listed below.

meas.est

Estimates the average variance matrix of measurement error for a set of subjects with repeated measures

Example datasets:

leaflife

leaf longevity and leaf mass per area for plant species from different sites. Used to demonstrate the functionality of the sma and ma functions.

leafmeas

leaf mass per area and photosynthetic rate for plant species from different sites. Used to demonstrate the meas.est function

For more details, see the documentation for any of the individual functions listed above.

References

Warton D. I. and Weber N. C. (2002) Common slope tests for bivariate structural relationships. Biometrical Journal 44, 161--174.

Warton D. I., Wright I. J., Falster D. S. and Westoby M. (2006) A review of bivariate line-fitting methods for allometry. Biological Reviews 81, 259--291.

Taskinen S. and Warton D. I. (in press) Robust estimation and inference for bivariate line-fitting in allometry. Biometrical Journal.

See Also

sma,ma, meas.est, leaflife, leafmeas

Examples

Run this code
# NOT RUN {
# See  ?sma and ?plot.sma for a full list of examples.

# }

Run the code above in your browser using DataLab