% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getHRandCIfromCoxph.R
\name{getHRandCIfromCoxph}
\alias{getHRandCIfromCoxph}
\title{Extract Hazard Ratio and Confidence Intervals from Cox Model}
\usage{
getHRandCIfromCoxph(coxphData)
}
\arguments{
\item{coxphData}{Fitted Cox model object from `survival::coxph()`.}
}
\value{
Data frame with p-values, HR, and confidence intervals.
}
\description{
Extracts hazard ratio (HR) and 95% confidence intervals from a fitted
Cox proportional hazards model.
}
\examples{
library(survival)
set.seed(123)
df <- data.frame(
  TTE = rexp(200, rate = 0.1),
  Cens = rbinom(200, size = 1, prob = 0.7),
  group = sample(c("Treatment", "Control"), 200, replace = TRUE)
)
coxphData <- survival::coxph(survival::Surv(TTE, Cens) ~ group, data = df)
results <- getHRandCIfromCoxph(coxphData)
print(results)
}
\author{
Dorothee Nickles

Dongqiang Zeng
}
