Fits a semi-parametric accelerated failure time (AFT) model to the provided data using various methods.
aftsem_fit(Z, y, delta, betafirst, method, control, intercept, resample, nobs)Returns a list object of class "aftsem" containing the following components: - `converged`: Logical indicating if the fitting procedure converged. - `beta`: The estimated beta coefficients. - `iters`: The number of iterations performed. - `resid`: The residuals from the model fit. NOT THE MARTINGALE RESIDUALS - `sampling.used`: Logical indicating if sampling was used. - `intercept`: The estimated intercept, included if `intercept = TRUE`. - `beta_star`: The beta coefficients estimated for each resample, included if resampling was used. - `fe`: Number of calls of function in minimalization proccess (only available for gehan-poly and gehan-heller method) - `covariance` Covariance matrix (only available for gehan-heller method)
A matrix of covariates.
A vector of the response variable, typically survival times.
A censoring indicator vector where 1 indicates an uncensored observation and 0 indicates a censored observation.
The initial estimate of the beta coefficients.
The method of estimation to use, one of "buckley", "gehan", "jin", or "gehan-poly".
A list of control parameters including `eps` for convergence criterion and `maxiter` for the maximum number of iterations.
Logical; if TRUE, include an intercept in the model.
The number of resamples to use for Monte Carlo estimation of variance; relevant for certain methods only.
The number of observations in the data.
The `aftsem_fit` function provides a way to fit a semi-parametric AFT model to survival data with potential RIGHT censoring. Depending on the chosen method, different estimation techniques are used, such as Buckley-James or Gehan's method. If resampling is required for the method, the function will generate resamples from an exponential distribution.