summLik: Model density evaluation for given data and parameters

summLikR Documentation

Model density evaluation for given data and parameters

Description

Evaluation of inferred probability density as function of parameters and of (projected) summary statistics is implemented as a generic function summLik. Given the (projected) statistics for the data used to build the SLik_j object, and the fitted parameters, this returns the (log)likelihood as the generic logLik extractor. However, parameters can be varied (providing the likelihood function), and the data too.

This documentation deals mostly with the method for objects of class SLik_j produced by the up-to-date version of the summary-likelihood workflow.

Usage

summLik(object, parm, data, ...)

# S3 method for class 'SLik_j'
## S3 method for class 'SLik_j'
summLik(object, parm, data=t(attr(object$logLs,"stat.obs")), 
                         log=TRUE, which="lik", ...)

Arguments

object

An SLik or SLik_j object

parm

data frame or matrix, containing coordinates of parameter points for which (log) likelihoods will be computed

data

The (projected, if relevant) summary statistics for which the likelihood of given parameters is to be computed. By default, the (projected) statistics for the data used to build the SLik_j object

log

Boolean: whether to return log likelihood or raw likelihood. Better ignored.

which

character string: "lik" for (log) likelihood inferred directly from the gaussian mixture model for joint parameters and summary statistics. But "safe", which deals with a possible problem of this direct computation (see Details), is used internally by Infusion in all maximizations of likelihood.

...

further arguments passed to or from other methods.

Details

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 “margpardens” 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)/margpardens(P) (for different P, each of jointdens and margdens are probabilities from a single (multivariate) gaussian mixture model, but this is not so for their ratio).

When margdens(P) is low, indicating that the region of parameter space around P has been poorly sampled in the simulation step, inference of likelihood 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 is penalized when margdens(P) is low. The penalization is of the form
penalized= unpenalized * pmin(1,margpardens/object$thr_dpar), where thr_dpar is a marginal density threshold stored in the SLik_j object. The source code should be consulted for details, and is subject to changes without notice.

Value

Numeric vector

See Also

logLik.

Examples

## Not run: 
## Using 'slik_j' object from the example in help("example_reftable") 
summLik(slik_j, parm=slik_j$MSL$MSLE+0.1)

# summLik() generalizes logLik():
summLik(slik_j, parm=slik_j$MSL$MSLE) == logLik(slik_j) # must be TRUE

## End(Not run)

Infusion documentation built on May 3, 2023, 5:10 p.m.

Related to summLik in Infusion...