powered by
Regression method for ph Class
# S4 method for 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 )
An object of class sph.
An object of class ph.
Vector or data.
Vector of weights.
Vector of right-censored observations.
Vector of weights for right-censored observations.
Model matrix (no intercept needed).
Initial regression coefficients (optional).
Number of EM steps to be performed.
Methods to use for matrix exponential calculation: RM, UNI, or PADE.
RM
UNI
PADE
Runge-Kutta step size (optional).
Epsilon parameter for uniformization method.
Method to use in gradient optimization.
Maximum number of iterations when optimizing g function.
Relative tolerance when optimizing g function.
Number of iterations between likelihood display updates.
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)
Run the code above in your browser using DataLab