fitmarg: Fit posterior marginal distributions to points

View source: R/BMArho.R

fitmargR Documentation

Fit posterior marginal distributions to points

Description

Compute (and re-scale, if necessary) the marginal from a set of points x and values of log-likelihood logy and log-prior density logp.

Usage

fitmarg(x, logy, logp = 0, usenormal = FALSE)

Arguments

x

Values of the random variable.

logy

Log-likelihood.

logp

Log-prior density.

usenormal

Whether use a Normal distribution for the fitted marginal.

Details

Fits a marginal at a set of points x from their log-likelihood and log-prior. The fitted marginal is re-scaled to integrate one if necessary. If usenormal=TRUE then the fitted marginal is supposed to be Normal, which is computed using the posterior mean and standard deviation of x.

Value

A function with the fitted marginal is returned.

Author(s)

Virgilio Gómez-Rubio <virgilio.gomez@uclm.es>

See Also

fitmargBMA, fitmargBMA2,mysplinefun


INLABMA documentation built on Nov. 18, 2023, 5:13 p.m.

Related to fitmarg in INLABMA...