% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phreg.R
\name{predict.phreg}
\alias{predict.phreg}
\title{Predictions from Proportional Hazards Model}
\usage{
\method{predict}{phreg}(
  object,
  newdata,
  times = NULL,
  individual.time = FALSE,
  tminus = FALSE,
  se = TRUE,
  robust = FALSE,
  conf.type = "log",
  conf.int = 0.95,
  km = FALSE,
  ...
)
}
\arguments{
\item{object}{Object of class \code{"phreg"}.}

\item{newdata}{Data frame for prediction. If \code{NULL}, predictions are made for the original data.}

\item{times}{Time points for prediction. Defaults to all unique event times in the model.}

\item{individual.time}{Logical; if \code{TRUE}, uses one time per subject (requires \code{newdata} and \code{times} to be same length).}

\item{tminus}{Logical; if \code{TRUE}, predicts at \eqn{t-} (strictly before \eqn{t}).}

\item{se}{Logical; if \code{TRUE}, computes standard errors and confidence intervals.}

\item{robust}{Logical; if \code{TRUE}, uses robust standard errors (default for most functions).}

\item{conf.type}{Transformation for survival estimates: \code{"log"} (default) or \code{"plain"}.}

\item{conf.int}{Confidence level (default 0.95).}

\item{km}{Logical; if \code{TRUE}, uses Kaplan-Meier product-limit for baseline; otherwise uses exponential of cumulative baseline.}

\item{...}{Additional arguments for plotting functions.}
}
\value{
An object of class \code{"predictphreg"} containing:
\item{surr}{Matrix of survival probabilities.}
\item{cumhaz}{Matrix of cumulative hazards.}
\item{cif}{Matrix of cumulative incidence functions (if applicable).}
\item{times}{Vector of time points.}
\item{surv.upper, surv.lower}{Confidence bounds for survival.}
\item{RR}{Relative risks.}
}
\description{
Computes predictions for survival probability, cumulative hazard, or risk at specified
time points for new data or existing data. Includes standard errors and confidence intervals.
}
\author{
Thomas Scheike
}
