streg | R Documentation |
streg()
is used to fit parametric proportional hazards survival models.
streg( formula, data, distribution = "exponential", x = FALSE, y = FALSE, init = NULL, control = list() )
formula |
A formula describing the model to be fitted.
The left-hand-side of the formula must be a |
data |
A data frame containing the variables in the model (as described by the model formula). |
distribution |
A character string naming the distribution to be assumed for the baseline hazard function.
Possible values are |
x |
Logical value indicating whether the model matrix used in the fitting process should be returned as components of the fitted object. |
y |
Logical value indicating whether the response vector (the |
init |
An optional vector of starting values for the fitting process.
If |
control |
A list of parameters for controlling the fitting process, which are passed to |
A general parametric proportional hazards survival model is defined as
h(t | X, θ, β) = h_0(t | θ) \exp(X β)
where X represents model covariates, θ represents any ancillary parameter, and β represents regression coefficients; h_0(\cdot) is the baseline hazard function.
The exponential model assumes the following baseline hazard function:
h_0(t | θ) = λ
In practice, λ is incorporated in the linear predictor and modelled on the log-scale (and reported as the (Intercept)
of the model).
The Weibull model assumes the following baseline hazard function:
h_0(t | θ) = p λ t^{p - 1}
λ is incorporated in the linear predictor and modelled on the log-scale (and reported as the (Intercept)
of the model); p is also modelled on the log-scale and reported as ln_p
.
Finally, the Gompertz model assumes the following baseline hazard function:
h_0(t | θ) = λ \exp(γ t)
λ is incorporated in the linear predictor and modelled on the log-scale (and reported as the (Intercept)
of the model), γ is reported as gamma
and not constrained to be strictly positive, as in Stata.
An object of class streg
.
library(streg) data("kva") fit <- streg(Surv(failtime, event) ~ load + bearings, data = kva, distribution = "exp", x = TRUE) fit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.