likelihood_cl: Calculate the likelihood for the FA and gFA models

Description Usage Arguments Value See Also

Description

This function calculates the MVN likelihood for factor analysis methods. If L_intg = FALSE then an approximation with point-density is used instead of integrating over suitable bounds.

Usage

1
2
likelihood_cl(test, pred, tr_fa, logl = TRUE, integrate = FALSE,
  truncate = FALSE)

Arguments

test

data frame. Test data set for evaluation.

pred

data frame or matrix. The provided predictions.

tr_fa

Test dataset (for evaluation).

logl

logical. Should the output be log-likelihood?

L_intg

logical. Should the likelihood be integrated over suitable borders? Defaults to FALSE, which uses an approximation with point-MVN density. Special care needs to be taken when integrating, as the likelihood is likely to be 0 in higher dimensions due to machine precision, resulting in non-finite log-likelihood.

Value

numeric vector. The (log-)likelihood for each test observation.

See Also

my_dmvn my_omxMnor


gregorp90/RStan-package-test documentation built on May 26, 2019, 1:32 a.m.