smle_ph: Fit the full likelihood proportional hazards model

View source: R/smle_ph.R

smle_phR Documentation

Fit the full likelihood proportional hazards model

Description

Fit the proportional hazards model with maximum full likelihood estimation. Sieve estimation is used for estimating the baseline hazard function.

Usage

smle_ph(y, d, x)

Arguments

y

n-vector of survival time (> 0).

d

n-vector of right-censoring indicator, 1: observed; 0: right-censored.

x

p-dimensional matrix of covariates.

Details

see Choi et al., (2026+) for detailed method explanation.

Value

smle_ph returns a list containing the following components:

  • Coef: regression estimator and its inferential results.

  • Cum.hazard: baseline cumulative hazard function estimates.

References

Choi et al., (2026+) Residual-Based Sieve Maximum Full Likelihood Estimation for the Proportional Hazards Model

Examples

library(smlePH)
set.seed(111)
n = 200
beta = c(1, -1, 0.5, -0.5, 1)
p = length(beta)
beta = matrix(beta, ncol = 1)
R = matrix(c(rep(0, p^2)), ncol = p)
diag(R) = 1
mu = rep(0, p)
SD = rep(1, p)
S = R * (SD %*% t(SD))
x = MASS::mvrnorm(n, mu, S)
T = (-log(runif(n)) / (2 * exp(x %*% beta)))^(1/2)
C = runif(n, min = 0, max = 2.9)
y = apply(cbind(T,C), 1, min)
d = (T <= C)+0
ord = order(y)
y = y[ord]; x = x[ord,]; d = d[ord]
smle_ph(y = y, d = d, x = x)

smlePH documentation built on March 15, 2026, 5:08 p.m.