log_f_rcpp3: Compute the Log-Likelihood Function Proportional Hazards...

View source: R/RcppExports.R

log_f_rcpp3R Documentation

Compute the Log-Likelihood Function Proportional Hazards Model (PHM)

Description

This function computes the log-likelihood function for the parametric model (PHM Approach).

Arguments

Params

A numeric vector of parameters.

Value

A numeric value representing the log-likelihood.

Examples

library(cmpp)
set.seed(1984)
features <- matrix(rnorm(300, 1, 2), nrow = 100, ncol = 3)
delta1 <- sample(c(0, 1), 100, replace = TRUE)
delta2 <- 1 - delta1
x <- rexp(100, rate = 1/10)
Initialize(features, x, delta1, delta2, h = 1e-5)
params <- rep(0.001, 2 * (ncol(features) + 2))
log_likelihood <- log_f_rcpp3(params)
print(log_likelihood)


cmpp documentation built on June 8, 2025, 11:39 a.m.