Learn R Programming

sitar (version 1.0.10)

dfpower: Tabulate BIC of SITAR models by degrees of freedom and xy power transformations

Description

dfpower fits a series of SITAR models for specified degrees of freedom and power transformations of x and y, returning a table of adjusted BIC.

Usage

dfpower(model, df, xpowers, ypowers, FUN = BICadj,
  maxIter = nlmeControl()$maxIter, verbose = FALSE)

Arguments

model

fitted sitar model to be updated.

df

vector of degrees of freedom to be fitted (defaults to df in model).

xpowers

vector of powers to apply to x (defaults to x power in model).

ypowers

vector of powers to apply to y (defaults to y power in model).

FUN

function to be tabulated (e.g. BICadj or AICadj).

maxIter

maximum number of iterations per fit.

verbose

logical controlling monitoring.

Value

3-way table of returned values by df, x and y powers.

Details

The function provides a convenient way to optimise the model's degrees of freedom and explore transformations of x and y. Adjusted BIC is obtained using BICadj, and is set negative for models failing to converge; the run-time can be shortened by reducing maxIter appropriately. For models failing to fit it returns NA.

FUN can be any function returning a single numerical value.

The returned table can be rearranged using aperm.

Examples

Run this code
# NOT RUN {
data(heights)
m1 <- sitar(log(age), height, id, heights, 4)
dfpower(m1, 4:5)
# }

Run the code above in your browser using DataLab