Returns "fitted values" of a (standardized) major axis fit.

# S3 method for sma
fitted(object, type = "fitted", newdata = NULL, centered = TRUE, ...)

Arguments

object

Object of class sma.

type

Either 'residuals', or 'fitted'.

newdata

New data for which to provide fitted values.

centered

Logical. If TRUE (the default) returns the zero-centered fitted values.

...

Further arguments are currently ignored.

Details

"Fitted values" are calculated using y+bx for SMA or by+x for MA (see Warton et al. 2006, especially Table 4). Note these values are calculated differently to ordinary linear regression, and they cannot be interpreted as predicted values. The "fitted values" should be interpreted as measuring how far along the fitted axis each point lies, and are used in checking assumptions (via residual vs. fitted value plots).

Fitted values may be computed for new data, using the newdata arguments. Be aware that the names of the variables need to be the same as in the data used in the original model fit. Also, if the original fit used log='xy', for example, this transformation will also be applied to your newdata (so don't do the transformation yourself).

References

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.

See also