reg-ph-method: Regression method for ph Class

reg,ph-methodR Documentation

Regression method for ph Class

Description

Regression method for ph Class

Usage

## S4 method for signature 'ph'
reg(
  x,
  y,
  weight = numeric(0),
  rcen = numeric(0),
  rcenweight = numeric(0),
  X = numeric(0),
  B0 = numeric(0),
  stepsEM = 1000,
  methods = c("RK", "UNI"),
  rkstep = NA,
  uni_epsilon = NA,
  optim_method = "BFGS",
  maxit = 50,
  reltol = 1e-08,
  every = 10
)

Arguments

x

An object of class ph.

y

Vector or data.

weight

Vector of weights.

rcen

Vector of right-censored observations.

rcenweight

Vector of weights for right-censored observations.

X

Model matrix (no intercept needed).

B0

Initial regression coefficients (optional).

stepsEM

Number of EM steps to be performed.

methods

Methods to use for matrix exponential calculation: RM, UNI, or PADE.

rkstep

Runge-Kutta step size (optional).

uni_epsilon

Epsilon parameter for uniformization method.

optim_method

Method to use in gradient optimization.

maxit

Maximum number of iterations when optimizing g function.

reltol

Relative tolerance when optimizing g function.

every

Number of iterations between likelihood display updates.

Value

An object of class sph.

Examples

set.seed(1)
obj <- iph(ph(structure = "general", dimension = 2), gfun = "weibull", gfun_pars = 2)
data <- sim(obj, n = 100)
X <- runif(100)
reg(x = obj, y = data, X = X, stepsEM = 10)

matrixdist documentation built on Aug. 8, 2023, 5:06 p.m.