rEB.Finite.Bayes {LPRelevance}R Documentation

Relevance-Integrated Finite Bayes.

Description

Performs custom-tailored Finite Bayes inference via LASERs.

Usage

rEB.Finite.Bayes(X,z,X.target,z.target,m=c(4,6),m.EB=8, B=10, centering=TRUE,
            nsample=min(1000,length(z)), g.method='DL',LP.type='L2',  sd0=NULL,
            theta.set.prior=seq(-2.5*sd(z),2.5*sd(z),length.out=500),
            theta.set.post=seq(z.target-2.5*sd(z),z.target+2.5*sd(z),length.out=500),
            post.alpha=0.8,  plot=TRUE, ...)

Arguments

X

A n-by-d matrix of covariate values

z

A length n vector containing observations of target random variable.

X.target

A length d vector providing the set of covariates for the target case.

z.target

the target z to investigate

m

An ordered pair. First number indicates how many LP-nonparametric basis to construct for each X, second number indicates how many to construct for z.

m.EB

The truncation point reflecting the concentration of true nonparametric prior density \pi around known prior distribution g

B

Number of bags of bootstrap samples for Finite Bayes.

centering

Whether to perform regression-adjustment to center the data, default is TRUE.

nsample

Number of relevance samples generated for the target case.

g.method

Suggested method for finding parameter estimates \hat{\mu} and \hat{\tau}^2 for normal prior: "DL" uses Dersimonian and Lard technique; "SJ" uses Sidik-Jonkman; 'REML' uses restricted maximum likelihood; and "MoM" uses a method of moments technique.

LP.type

User selects either "L2" for LP-orthogonal series representation of relevance density function d or "MaxEnt" for the maximum entropy representation. Default is L2.

sd0

Fixed standard deviation for z|\theta. Default is NULL, the standard error will be calculated from data.

theta.set.prior

This indicates the set of grid points to compute prior density.

theta.set.post

This indicates the set of grid points to compute posterior density.

post.alpha

The alpha level for posterior HPD interval.

plot

Whether to display plots for prior and posterior of Relevance Finite Bayes.

...

Extra parameters to pass to LASER function.

Value

A list containing the following items:

prior

Relevant Finite Bayes prior results.

$prior.fit

Prior density curve estimation.

posterior

Relevant empirical Bayes posterior results.

$post.fit

Posterior density curve estimation.

$post.mode

Posterior mode for \pi(\theta|z,\boldsymbol{x}).

$post.mean

Posterior mean for \pi(\theta|z,\boldsymbol{x}).

$post.mean.sd

Standard error for the posterior mean.

$HPD.interval

The HPD interval for posterior \pi(\theta|z,\boldsymbol{x}).

g.par

Parameters for g=N(\mu,\tau^2).

LP.coef

Reports the LP-coefficients of the relevance function d_x(x).

sd0

Initial estimate for null standard errors.

plots

The plots for prior and posterior density.

Author(s)

Subhadeep Mukhopadhyay, Kaijun Wang

Maintainer: Kaijun Wang <kaijunwang.19@gmail.com>

References

Mukhopadhyay, S., and Wang, K (2021) "On The Problem of Relevance in Statistical Inference". <arXiv:2004.09588>

Examples


data(funnel)
X<-funnel$x
z<-funnel$z
X.target=30
z.target=4.49
rFB.out=rEB.Finite.Bayes(X,z,X.target,z.target,B=5,nsample=1000,m=c(4,8),m.EB=8,
                      theta.set.prior=seq(-4,4,length.out=500),
                      theta.set.post=seq(0,5,length.out=500),cred.interval=0.8,parallel=FALSE)
rFB.out$plots$prior
rFB.out$plots$post


[Package LPRelevance version 3.3 Index]