Learn R Programming

cmpp (version 0.0.1)

F_cdf_rcpp: Compute the CDF of the Parametric Generalized odds rate (GOR)

Description

This function computes the cumulative distribution function (CDF) of the parametric model (GOR Approach).

Value

A numeric value representing the CDF.

Arguments

Params

A numeric vector of parameters.

Z

A numeric vector of covariates.

x

A numeric value representing the time point.

Examples

Run this code
library(cmpp)
set.seed(321)
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/2)
Initialize(features, x, delta1, delta2, h = 1e-3)
params <- rep(0.001, 2 * (ncol(features) + 3))
y <- 0.07
z <- features[1, ]
(cdf_value <- F_cdf_rcpp(params, z, y))

Run the code above in your browser using DataLab