lssVarReg {VarReg}R Documentation

Semi parametric location, shape and scale regression

Description

lssVarReg performs a semiparametric location (\xi or xi), shape (\nu or nu) and scale (\omega or omega) regression model. Currently, this is only designed for a single covariate that is fit in the location, scale and shape models.

Usage

lssVarReg(
  y,
  x,
  locationmodel = c("constant", "linear", "semi"),
  scale2model = c("constant", "linear", "semi"),
  shapemodel = c("constant", "linear"),
  knots.l = 2,
  knots.sc = 2,
  knots.sh = 2,
  degree = 2,
  mono.scale = c("none", "inc", "dec"),
  para.space = c("all", "positive", "negative"),
  location.init = NULL,
  scale2.init = NULL,
  shape.init = NULL,
  int.maxit = 1000,
  print.it = FALSE,
  control = list(...),
  ...
)

Arguments

y

Vector containing outcome data. Must be no missing data.

x

Vector containing the covariate data, same length as y. Must be no missing data.

locationmodel

Text to specify the location model to be fit. Options: "constant" = constant model (intercept only), "linear" = linear term with x covariate, "semi" = semiparametric spline (specify with knots.l).

scale2model

Text to specify the scale^2 model to be fit. Options: "constant" = constant term only, "linear" = linear term with x covariate, "semi" = semiparametric spline (specify with knots.sc)

shapemodel

Text to specify the shape model to be fit. Options: "constant" = constant shape model, "linear" = linear term with x covariate, "semi" = semiparametric spline (specify with knots.sh).

knots.l

Integer indicating the number of internal knots to be fit in the location model. Default is '2'. (Note that the knots are placed equidistantly over x.)

knots.sc

Integer indicating the number of internal knots to be fit in the scale^2 model. Default is '2'. (Note that the knots are placed equidistantly over x.)

knots.sh

Integer indicating the number of internal knots to be fit in the shape model. Default is '2'. (Note that the knots are placed equidistantly over x.)

degree

Integer to indicate the degree of the splines fit in the location and scale. Default is '2'.

mono.scale

Text to indicate whether the scale2 model is monotonic. Default is "none" (no monotonic constraints). Options are "inc" for increasing or "dec" for decreasing. If this is chosen, the appropriate para.space is set autopmatically ("positive" for inc, "negative" for dec).

para.space

Text to indicate the parameter space to search for scale2 parameter estimates. "positive" means only search positive parameter space, "negative" means search only negative parameter space and "all" means search all parameter spaces. Default is all.

location.init

Vector of initial parameter estimates for the location model. Defaults to vector of 1's of appropriate length.

scale2.init

Vector of initial parameter estimates for the scale^2 model. Defaults to vector of 1's of appropriate length.

shape.init

Vector of initial parameter estimates for the shape model. Defaults to vector of 1's of appropriate length.

int.maxit

Integer of maximum iterations for the internal location and scale EM algorithm. Default is 1000 iterations.

print.it

Logical for printing progress of estimates through each iteration. Default is FALSE.

control

List of control parameters for the algorithm. See VarReg.control.

...

arguments to be used to form the default control argument if it is not supplied directly

Value

lssVarReg returns an object of class "lssVarReg", which inherits most from class "VarReg". This object of class lssVarReg is a list of the following components:

See Also

VarReg.control plotlssVarReg

Examples

## run a model with linear mean, linear variance and constant shape (not run):
## lssmodel<-lssVarReg(mcycle$accel, mcycle$times,  locationmodel="linear", scale2model="linear",
## shapemodel="constant",  maxit=10000)

[Package VarReg version 2.0 Index]