compute_log_f_hessian_rcpp {cmpp}R Documentation

Compute the Hessian Matrix of the Log-Likelihood Function Generalized odds rate (GOR)

Description

This function computes the Hessian matrix of the log-likelihood function for the parametric model (GOR Approach).

Arguments

Params

A numeric vector of parameters.

Value

A numeric matrix representing the Hessian matrix of 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/7)
Initialize(features, x, delta1, delta2, h = 1e-4)
params <- rep(0.001, 2 * (ncol(features) + 3))
hessian <- compute_log_f_hessian_rcpp(params)
print(hessian)


[Package cmpp version 0.0.2 Index]