fit,shared-method | R Documentation |
Fit method for shared phase-type frailty models
## S4 method for signature 'shared'
fit(
x,
y,
rcen = 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 shared. |
y |
Matrix or data. |
rcen |
Matrix of indicators of right-censored 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 shared.
ph_obj <- phasetype(structure = "coxian")
shared_obj <- shared(ph_obj, bhaz1 = "weibull", bhaz_pars1 = 3, bhaz2 = "weibull", bhaz_pars2 = 2)
data <- sim(shared_obj, n = 100)
fit(shared_obj, data, stepsEM = 50, every = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.