reg,ph-method | R Documentation |
Regression method for ph Class
## 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
)
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: |
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. |
An object of class sph.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.