compileregions: Calculates region model fit

Description Usage Arguments Details Value Examples

Description

Uses calcregions to calculate region models for each variable separately, then exports the summed residual sums of squares.

Usage

1
compileregions(Xvar, data, noregions = 2)

Arguments

Xvar

Positional variable e.g., vertebral count.

data

Matrix of dependent variables.

noregions

Maximum number of regions to be computed, up to 6.

Details

This function feeds data into calcregions, compiles the results and calculates model fitting metrics.

Value

Returns a data matrix with one row for each model. Columns include model parameters (breakpoints) and residual sums of squares for each dependent variable

Examples

1
2
3
4
data("alligator")
Xvar=alligator[,1]
data=alligator[,2:ncol(alligator)]
regiondata=compileregions(Xvar, data, 2)

katrinajones/regions documentation built on May 9, 2019, 5:48 a.m.