predict.SLik_j | R Documentation |
As the Title says. As likelihood is obtained as a prediction from a statistical model for the likelihood surface, this has been implemented as a method of the predict
generic, for objects created by the up-to-date workflow using gaussian mixture modelling of a joint distribution of parameters and statistics. Hence, it has a newdata
argument, as shared by many predict
methods; but these newdata
should be parameter values, not data). You can use the alternative summLik
extractor if you do not like this syntax.
## S3 method for class 'SLik_j'
predict(
object, newdata, log = TRUE, which = "safe",
tstat = t(get_from(object,"stat.obs")),
solve_t_chol_sigma_lists = object$clu_params$solve_t_chol_sigma_lists,
constr_tuning= FALSE,
...)
object |
an object of class |
newdata |
A matrix, whose rows each contain a full vector of the fitted parameters; or a single vector. If parameter names are not provided (as column names in the matrix case), then the vector is assumed to be ordered as |
log |
Boolean: whether to return log-likelihood or likelihood. |
which |
|
tstat |
The data (as projected summary statistics). Defaults to the data input in the inference procedure (i.e., the projected statistics used as |
solve_t_chol_sigma_lists |
For programming purposes. Do not change this argument. |
constr_tuning |
positive number, or FALSE: controls the effect of parameter constraints specified by the |
... |
For consistency with the generic. Currently ignored. |
An object of class SLik_j
contains a simulated joint distribution of parameters and (projected) summary statistics, and a fit of a multivariate gaussian mixture model to this simulated distribution, the “jointdens”, from which a marginal density “pardens” of parameters can be deduced. The raw likelihood(P;D) is the probability of the data D given the parameters P, viewed as function the parameters and for fixed data. It is inferred as jointdens(D,P)/pardens(P) (for different P, each of jointdens and pardens are probabilities from a single (multivariate) gaussian mixture model, but this is not so for their ratio).
When pardens(P) is low, indicating that the region of parameter space around P has been poorly sampled in the reference table, inference of likelihood in such regions is unreliable. Spuriously high likelihood may be inferred, which results notably in poor inference based on likelihood ratios. For this reason, it is often better to use the argument which="safe"
whereby the likelihood may be penalized where pardens(P) is low. The penalization is applied to cases where the uncorrected likelihood is higher than the maximum one in the reference table, and pardens(P) is lower than a threshold also determined from the reference table. The source code should be consulted for further details.
Numeric: a single value, or a vector of (log-)likelihoods for different rows of the input newdata
. When which="safe"
, a "lowdens"
attribute will be added when at least on parameter points had a low “pardens” (see Details).
## see help("example_reftable")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.