% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hazard_api.R
\name{vcov.hazard}
\alias{vcov.hazard}
\title{Extract variance-covariance matrix from hazard model}
\usage{
\method{vcov}{hazard}(object, ...)
}
\arguments{
\item{object}{A \code{hazard} object.}

\item{...}{Unused; for S3 compatibility.}
}
\value{
A numeric matrix containing the estimated variance-covariance matrix
of the fitted coefficients, with rows and columns named by the coefficient
labels (phase-prefixed for multiphase models, e.g. \code{early.x}). Rows
and columns for parameters held fixed (e.g. fixed shape parameters) are
\code{NA} because they carry no variance; the finite free-parameter block
is still usable. For Conservation-of-Events fits the conserved phase
\code{log_mu} \emph{normally} carries a variance: it is removed from the
optimizer search but the vcov is the full-information matrix at the optimum
(the CoE solution is the unconstrained MLE). That recomputation requires
\pkg{numDeriv} and an invertible Hessian; if either is unavailable the fit
emits a warning and the conserved \code{log_mu} stays \code{NA} (the rest
of the matrix is unaffected). Returns a scalar \code{NA} only when the
model has not been fitted or no covariance matrix is available.
}
\description{
Returns the estimated variance-covariance matrix of the fitted coefficients.
}
\examples{
fit <- hazard(time = rexp(30, 0.5), status = rep(1L, 30),
              theta = c(0.3, 1.0), dist = "weibull", fit = TRUE)
vcov(fit)
}
