f_pdf_rcpp3 {cmpp} | R Documentation |
Compute the PDF of the Parametric Proportional Hazards Model (PHM)
Description
This function computes the probability density function (PDF) of the parametric model (PHM Approach).
Arguments
Params |
A numeric vector of parameters. |
Z |
A numeric vector of covariates. |
x |
A numeric value representing the time point. |
Value
A numeric value representing the PDF.
Examples
library(cmpp)
set.seed(21)
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)
Initialize(features, x, delta1, delta2, h = 1e-5)
params <- rep(0.0001, (ncol(features) + 2))
pdf_value <- f_pdf_rcpp3(params, features[4, ], x[4])
print(pdf_value)
[Package cmpp version 0.0.2 Index]