Learn R Programming

tcplfit2 (version 0.1.7)

nestselect: Nest Select

Description

Chooses between nested models.

Usage

nestselect(aics, mod1, mod2, dfdiff, pval = 0.05)

Value

Named aic vector with losing model removed.

Arguments

aics

Named vector of model aics (can include extra models).

mod1

Name of model 1, the model with fewer degrees of freedom.

mod2

Name of model 2, the model with more degrees of freedom.

dfdiff

Absolute difference in number of degrees of freedom (i.e. the difference in parameters).

pval

P-value for nested model test.

Examples

Run this code
aics = c(-5,-6,-3)
names(aics) = c("poly1", "poly2", "hill")
nestselect(aics, "poly1", "poly2", 1)

aics = c(-5,-7,-3)
names(aics) = c("poly1", "poly2", "hill")
nestselect(aics, "poly1", "poly2", 1)

Run the code above in your browser using DataLab