mod_OLS: Extant standard using a linear, ordinary least squares model

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/mod_OLS.R

Description

An internal function used by MASSunite to project a VD recontruction onto a standard of accuracy.

Usage

1
2
3
4
5
6
mod_OLS(xvar = extants$log.HCFC, yvar = extants$log.BM, 
                    xlab = "Log Stylopodial Circumference",ylab = "Log Body Mass",
                    xlim = c(1, 3.5), ylim = c(1.5, 8), cex = 0.5, pch = 4, col = "gray", 
                    fit.col = "black", pred.seq = seq(from = 1, to = 4, by = 0.01), 
                    PI.col = "blue", PI.lty = 2, CI.col = "red", CI.lty = 1, 
                    verbose = FALSE, plot = TRUE, ...)

Arguments

xvar, yvar

the x and y coordinates of the model, defaults to the log combined humeral and femoral circumferences and their associated log body mass, respectively.

xlab, ylab

single character objects specifying the axes labels, as in par, defaults to xlab = "Log Stylopodial Circumference" and ylab = "Log Body Mass".

xlim, ylim

numeric vector specifying the axes ranges, as in par, defaults to xlim = c(1, 3.5) and ylim = c(1.5, 8).

cex, pch, col

main plotting parameters, as in par, defaults to cex = 0.5, pch = 4, and col = "gray".

fit.col

character object specifying the colour of the fitted line.

pred.seq

integer or numeric sequence use as newdata to generate confidence and prediction intervals.

PI.col, PI.lty

colour and line-type parameters for the prediction interval lines.

CI.col, CI.lty

colour and line-type parameters for the confidence interval lines.

verbose

a logical value indicating whether the results of the model fitting are returned.

plot

a logical value indicating whether the plot should be produced, defaults to plot = FALSE.

...

parameter arguments passed to plot.

Details

This function is mostly used internally by MASSunite to project volumetric reconstruction models onto the linear limb circumferences standard of accuracy, as presented in Campione & Evans (2020). However, the function can technically be used to generate a plot of any x-y coordinates with their fitted ordinary least squares line and associated confidence/prediction intervals. N.B. If modified, the defaults may not suite.

Value

The default function will generate a plot. If verbose = TRUE a 3 item list will be returned with:

model

the output from lm.

prediction

a 3-column matrix with the fitted, lower, and upper prediction intervals for the vector given in pred.seq.

confidence

a 3-column matrix with the fitted, lower, and upper confidence intervals for the vector given in pred.seq.

Author(s)

Nicolas E. Campione

References

Campione, N. E. and Evans, D. C. (2012) A universal scaling relationship between body mass and proximal limb bone dimensions in quadrupedal terrestrial tetrapods. BMC Biology, 10, 60.

Campione, N. E. and Evans, D. C. (2020) The accuracy and precisions of body mass estimation in non-avian dinosaurs. Biological Reviews.

See Also

MASSunite mod_QUAD

Examples

1

MASSTIMATE documentation built on Jan. 8, 2021, 2:22 a.m.