powered by
Fit method for ph class
# S4 method for ph fit( x, y, weight = numeric(0), rcen = numeric(0), rcenweight = numeric(0), stepsEM = 1000, methods = c("RK", "RK"), rkstep = NA, uni_epsilon = NA, maxit = 100, reltol = 1e-08, every = 100, r = 1 )
An object of class ph.
Vector or data.
Vector of weights.
Vector of right-censored observations.
Vector of weights for right-censored observations.
Number of EM steps to be performed.
Methods to use for matrix exponential calculation: RM, UNI or PADE.
Runge-Kutta step size (optional).
Epsilon parameter for uniformization method.
Maximum number of iterations when optimizing g function.
Relative tolerance when optimizing g function.
Number of iterations between likelihood display updates.
Sub-sampling proportion for stochastic EM, defaults to 1.
obj <- iph(ph(structure = "general", dimension = 2), gfun = "weibull", gfun_pars = 2) data <- sim(obj, n = 100) fit(obj, data, stepsEM = 100, every = 20)
Run the code above in your browser using DataLab