View source: R/compute_lik_prod.R
compute_lik_prod | R Documentation |
This function computes the portion of the likelihood for a given sample i
and for
a given point in the sample space for lambda_i
.
compute_lik_prod(a, epsilon, beta, x, y, lambda, i, KO_max, use_expit = FALSE)
a |
A number in |
epsilon |
A number in |
beta |
A matrix with |
x |
A design matrix, where the first column contains |
y |
The outcome matrix, with |
lambda |
A vector of |
i |
A number representing the sample being considered. |
KO_max |
A vector of length |
use_expit |
If |
The likelihood product for the given sample i
and lambda vector.
beta <- matrix(rnorm(4), nrow = 2) x <- matrix(c(rep(1, 5), rbinom(5, 1, 0.5)), nrow = 5) y <- matrix(c(rbinom(5*5, 1, 0.5)), nrow = 5) lambda <- c(1, 0) KO_max <- c(1, 1, 1, 0, 0) compute_lik_prod(0.8, 0.1, beta, x, y, lambda, 2, KO_max)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.