Description Usage Arguments Value Author(s) References See Also Examples
View source: R/degross_lpostBasic.R
Log-posterior for given spline parameters, big bin (and optional: small bin) frequencies, tabulated sample moments and roughness penalty parameter. Compared to degross_lpost, no Fisher information matrix is computed and the gradient evaluation is optional, with a resulting computational gain.
1 2 3 4 |
phi |
Vector of K B-spline parameters φ to specify the log-density. |
tau |
Roughness penalty parameter. |
n.i |
Small bin frequencies. |
degross.data |
A degrossData.object created using the degrossData function. |
use.moments |
Vector with 4 logicals indicating which tabulated sample moments to use as soft constraints. Defaults: |
freq.min |
Minimal big bin frequency required to use the corresponding observed moments as soft constraints. Default: |
diag.only |
Logical indicating whether to ignore the off-diagonal elements of the variance-covariance matrix of the sample central moments. Default: FALSE. |
gradient |
Logical indicating if the gradient (Score) of the \log p(φ|τ,data) should be computed (default: FALSE). |
penalize |
Logical indicating whether a roughness penalty of order |
aa |
Real giving the first parameter in the Gamma prior for |
bb |
Real giving the second parameter in the Gamma prior for |
pen.order |
Integer giving the order of the roughness penalty. Default: |
A list containing :
lpost.ni
:
value of the log-posterior based on the given small bin frequencies n.i
and the tabulated sample moments.
lpost.mj
:
value of the log-posterior based on the big bin frequencies degross.data$freq.j
and the tabulated sample moments.
llik.ni
:
multinomial log-likelihood based on the given small bin frequencies n.i
.
llik.mj
:
multinomial log-likelihood based on the big bin frequencies degross.data$freq.j
resulting from n.i
.
moments.penalty
:
log of the joint (asymptotic) density for the observed sample moments.
penalty
:
\log p(φ|τ) + \log p(τ).
M.j
:
theoretical moments of the density (resulting from φ) within a big bin.
pi.i
:
small bin probabilities.
ui
:
small bin midpoints.
delta
:
width of the small bins.
gamma.j
:
big bin probabilities.
tau
:
reminder of the value of the roughness penalty parameter τ.
phi
:
reminder of the vector of spline parameters (defining the density).
n.i
:
reminder of the small bin frequencies given as input.
freq.j
:
reminder of the big bin frequencies in degross.data$freq.j
.
Philippe Lambert p.lambert@uliege.be
Lambert, P. (2021) Moment-based density and risk estimation from grouped summary statistics. arXiv:2107.03883.
degross_lpost
, degross
, degross.object
.
1 2 3 4 5 6 7 8 9 | sim = simDegrossData(n=3500, plotting=TRUE,choice=2) ## Generate grouped data
obj.data = degrossData(Big.bins=sim$Big.bins, freq.j=sim$freq.j, m.j=sim$m.j)
print(obj.data)
obj.fit = degross(obj.data) ## Estimate the underlying density
phi.hat = obj.fit$phi ; tau.hat = obj.fit$tau
## Evaluate the log-posterior at convergence
res = degross_lpostBasic(phi=phi.hat, tau=tau.hat, degross.data=obj.data,
gradient=TRUE)
print(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.