MoE,ph-method | R Documentation |
MoE method for ph Class
## S4 method for signature 'ph'
MoE(
x,
formula,
data,
inhom = NULL,
alpha_vecs = NULL,
weight = numeric(0),
delta = numeric(0),
stepsEM = 1000,
optim_method = "BFGS",
maxit = 50,
reltol = 1e-08,
every = 10,
rand_init = TRUE
)
x |
An object of class ph. |
formula |
A regression formula. |
data |
A data frame. |
inhom |
A list with the inhomogeneity functions. |
alpha_vecs |
Matrix of initial probabilities.s |
weight |
Vector of weights. |
delta |
Right-censoring indicator. |
stepsEM |
Number of EM steps to be performed. |
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. |
rand_init |
Random initiation in the R-step. |
An object of class sph.
x <- iph(ph(structure = "general"), gfun = "weibull")
n <- 100
responses <- rweibull(n, 2, 3)
covariate <- data.frame(age = sample(18:65, n, replace = TRUE) / 100, income = runif(n, 0, 0.99))
f <- responses ~ age + income # regression formula
MoE(x = x, formula = f, y = responses, data = covariate, stepsEM = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.