likVec {skipTrack} | R Documentation |
Monte Carlo estimate of negative marginal log-likelihood of Li model
Description
This function calculates a Monte Carlo estimate of the negative marginal log-likelihood of the given hyperparameters for the generative model from Li et al. (2022). It samples M instances of the parameters from the given distributions and averages the the likelihoods, giving a marginal likelihood for the hyperparameters.
Usage
likVec(
pars = c(kappa = 180, gamma = 6, alpha = 2, beta = 20),
S = 10,
M = 1000,
cycleDat,
verbose = FALSE,
...
)
Arguments
pars |
Named numeric vector of hyperparameters containing the elements: kappa, gamma, alpha, beta. NOTE: MUST BE IN CORRECT ORDER.
|
S |
Integer, maximum number of allowed skips in the model. |
M |
Integer specifying the number of Monte Carlo iterations. |
cycleDat |
Data frame containing information about individuals and their tracked cycles. |
verbose |
Logical with default FALSE. If true, prints extra info while running. |
... |
Does nothing. |
Value
Numeric value representing the Monte Carlo estimate of the negative marginal log-likelihood.
References
Li, Kathy, et al. "A predictive model for next cycle start date that accounts for adherence in menstrual self-tracking." Journal of the American Medical Informatics Association 29.1 (2022): 3-11.