Learn R Programming

nlme (version 3.1-99)

varConstPower: Constant Plus Power Variance Function

Description

This function is a constructor for the varConstPower class, representing a constant plus power variance function structure. Letting $v$ denote the variance covariate and $\sigma^2(v)$ denote the variance function evaluated at $v$, the constant plus power variance function is defined as $\sigma^2(v) = (\theta_1 + |v|^\theta_2)^2$, where $\theta_1,\theta_2$ are the variance function coefficients. When a grouping factor is present, different $\theta_1,\theta_2$ are used for each factor level.

Usage

varConstPower(const, power, form, fixed)

Arguments

const, power
optional numeric vectors, or lists of numeric values, with, respectively, the coefficients for the constant and the power terms. Both arguments must have length one, unless a grouping factor is specified in form. If either argume
form
an optional one-sided formula of the form ~ v, or ~ v | g, specifying a variance covariate v and, optionally, a grouping factor g for the coefficients. The variance covariate must evaluate to
fixed
an optional list with components const and/or power, consisting of numeric vectors, or lists of numeric values, specifying the values at which some or all of the coefficients in the variance function should be fixed.

Value

  • a varConstPower object representing a constant plus power variance function structure, also inheriting from class varFunc.

References

Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer.

See Also

varClasses, varWeights.varFunc, coef.varConstPower

Examples

Run this code
vf1 <- varConstPower(1.2, 0.2, form = ~age|Sex)

Run the code above in your browser using DataLab