fit,phasetype-method | R Documentation |
Fit method for phase-type frailty models
## S4 method for signature 'phasetype'
fit(
x,
y,
rcen = numeric(0),
weight = numeric(0),
X = numeric(0),
stepsEM = 100,
stepsPH = 50,
initialpoint = 1e-04,
truncationpoint = 10,
maxprobability = 0.01,
maxdelta = 0.05,
maxit = 100,
reltol = 1e-08,
every = 100
)
x |
An object of class phasetype. |
y |
Vector or data. |
rcen |
Vector of right-censored observations. |
weight |
Vector of weights for observations. |
X |
A matrix of covariates. |
stepsEM |
Number of EM steps to be performed. |
stepsPH |
Number of EM steps for the phase-type component at each iteration of the global EM. |
initialpoint |
Initial value for discretization of density. |
truncationpoint |
Ultimate value for discretization of density. |
maxprobability |
Max probability allowed for an interval in the discretization. |
maxdelta |
Max size of interval allowed for the discretization. |
maxit |
Maximum number of iterations when optimizing g function. |
reltol |
Relative tolerance when optimizing g function. |
every |
Number of iterations between likelihood display updates. |
An object of class phasetype.
obj <- frailty(phasetype(structure = "general", dimension = 2), bhaz = "weibull", bhaz_pars = 2)
data <- sim(obj, n = 100)
fit(obj, data, stepsEM = 50, every = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.