fit,ph-method {matrixdist} | R Documentation |
Fit method for ph class
Description
Fit method for ph class
Usage
## S4 method for signature 'ph'
fit(
x,
y,
weight = numeric(0),
rcen = numeric(0),
rcenweight = numeric(0),
stepsEM = 1000,
methods = c("RK", "RK"),
rkstep = NA,
uni_epsilon = NA,
maxit = 100,
reltol = 1e-08,
every = 100,
r = 1
)
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. |
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. |
maxit |
Maximum number of iterations when optimizing g function. |
reltol |
Relative tolerance when optimizing g function. |
every |
Number of iterations between likelihood display updates. |
r |
Sub-sampling proportion for stochastic EM, defaults to 1. |
Value
An object of class ph.
Examples
obj <- iph(ph(structure = "general", dimension = 2), gfun = "weibull", gfun_pars = 2)
data <- sim(obj, n = 100)
fit(obj, data, stepsEM = 100, every = 20)
[Package matrixdist version 1.1.9 Index]