Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

coef.lm.rrpp

coef for lm.rrpp model fits


Description

Computes ordinary or generalized least squares coefficients over the permutations of an lm.rrpp model fit with predefined random permutations. For each coefficient vector, the Euclidean distance is calculated as an estimate of the amount of change in Y, the n x p matrix of dependent variables; larger distances mean more change in location in the data space associated with a one unit change in the model design, for the parameter described. Random coefficients are based on either RRPP or FRPP, as defined by the lm.rrpp model fit. If RRPP is used, all distributions of coefficient vector distances are based on appropriate null models as defined by SS type.

This function can be used to test the specific coefficients of an lm.rrpp fit. The test statistics are the distances (d), which are also standardized (Z-scores). The Z-scores might be easier to compare, as the expected values for random distances can vary among coefficient vectors (Adams and Collyer 2016).

Usage

## S3 method for class 'lm.rrpp'
coef(object, test = FALSE, confidence = 0.95, ...)

Arguments

object

Object from lm.rrpp

test

Logical argument that if TRUE, performs hypothesis tests (Null hypothesis is vector distance = 0) for the observed coefficients. If FALSE, only the observed coefficients are returned.

confidence

The desired confidence limit to print with a table of summary statistics, if test = TRUE. Because distances are directionless, confidence limits are one-tailed.

...

Other arguments (currently none)

Author(s)

Michael Collyer

Examples

# See examples for lm.rrpp to see how anova.lm.rrpp works in conjunction
# with other functions

data(Pupfish)
names(Pupfish)
Pupfish$logSize <- log(Pupfish$CS)

fit <- lm.rrpp(coords ~ logSize + Sex*Pop, SS.type = "I", data = Pupfish) 

coef(fit)
coef(fit, test = TRUE, confidence = 0.99)

RRPP

Linear Model Evaluation with Randomized Residuals in a Permutation Procedure

v1.0.0
GPL (>= 3)
Authors
Michael Collyer [aut, cre] (<https://orcid.org/0000-0003-0238-2201>), Dean Adams [aut] (<https://orcid.org/0000-0001-9172-7894>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.