f_pdf_rcpp | R Documentation |
This function computes the probability density function (PDF) of the parametric model (GOR Approach).
Params |
A numeric vector of parameters. |
Z |
A numeric vector of covariates. |
x |
A numeric value representing the time point. |
A numeric value representing the PDF.
library(cmpp)
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, (ncol(features) + 3))
pdf_value <- f_pdf_rcpp(params, features[1, ], x[3])
print(pdf_value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.