seVarReg {VarReg}R Documentation

SE calculations for mean and variance regression models

Description

seVarReg calculates SE for an object of class VarReg. If the result is not on a boundary, the Fishers Information matrix SE are given. The bootstrapped 95% CI can also be calculated. Designed to be called by the plot function plotVarReg, rather than run by a user.

Usage

seVarReg(
  x,
  boot = FALSE,
  bootreps = 1000,
  vector.mean = x$data[, 2],
  vector.variance = x$data[, 2],
  control = list(...),
  ...
)

Arguments

x

Object of class VarReg to determin the SE (eg. result from semiVarReg).

boot

Logical to indicate if bootstrapped CI should be calculated. Default is FALSE.

bootreps

Number of bootstraps to be performed if boot=TRUE. Default is 1000.

vector.mean

Vector of x values for which the SE of the mean is to be calculated. Default is the x covariate from the model.

vector.variance

Vector of x values for which the SE of the variance is to be calculated. Default is the actual x covariate from the model.

control

List of control parameters for the bootstrapped models. See VarReg.control.

...

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

Value

The result is a list of results. This includes:

See Also

semiVarReg, VarReg.control

Examples

data(mcycle)
##Fit model with range as a covariate in the mean and the variance model
semimodel<-semiVarReg(mcycle$accel, mcycle$times, meanmodel="semi", varmodel="linear",
knots.m=4, maxit=10000)
##Calculate SE
se1<-seVarReg(semimodel, boot=FALSE)
##not run: with bootstrapping
##se2<-seVarReg(semimodel, boot=TRUE, bootreps=10)
##not run: calculate mean and SE for a given sequence
##test.seq<-seq(min(mcycle$times), max(mcycle$times),
##by=((max(mcycle$times)-min(mcycle$times))/999))
##se2<-seVarReg(semimodel, boot=TRUE, bootreps=10, vector.mean=test.seq)

[Package VarReg version 2.0 Index]