Performs custom-tailored empirical Bayes inference via LASERs.
rEB.proc(X, z, X.target, z.target, m = c(4, 6), nbag = NULL, centering = TRUE,
lp.reg.method = "lm", coef.smooth = "BIC", nsample = min(length(z),2000),
theta.set.prior = NULL, theta.set.post = NULL, LP.type = "L2",
g.method = "DL", sd0 = NULL, m.EB = 8, parallel = FALSE,
avg.method = "mean", post.curve = "HPD", post.alpha = 0.8,
color = "red", ...)A \(n\)-by-\(d\) matrix of covariate values
A length \(n\) vector containing observations of target random variable.
A length \(d\) vector providing the set of covariates for the target case.
the target \(z\) to investigate
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\).
Number of bags of parametric bootstrapped samples to use, set to NULL to disable.
Whether to perform regression-adjustment to center the data, default is TRUE.
Method for estimating the relevance function and its conditional LP-Fourier coefficients. We currently support thee options: lm (inbuilt with subset selection), glmnet, and knn.
Specifies the method to use for LP coefficient smoothing (AIC or BIC). Uses BIC by default.
Number of relevance samples generated for the target case.
This indicates the set of grid points to compute prior density.
This indicates the set of grid points to compute posterior density.
User selects either "L2" for LP-orthogonal series representation of relevance density function \(d\) or "MaxEnt" for the maximum entropy representation. Default is L2.
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.
Fixed standard deviation for \(z|\theta\). Default is NULL, the standard error will be calculated from data.
The truncation point reflecting the concentration of true nonparametric prior density \(\pi\) around known prior distribution \(g\)
Use parallel computing for obtaining the relevance samples, mainly used for very huge nsample, default if FALSE.
For parametric bootstrapping, this specifies how the results from different bags are aggregated. ("mean" or "median".)
For plotting, this specifies what to show on posterior curve. "HPD" provides HPD interval, "band" gives confidence band.
Confidence level to use when plotting posterior confidence band, or the alpha level for HPD interval.
The color of the plots.
Extra parameters to pass to other functions. Currently only supports the arguments for knn().
A list containing the following items:
Contains relevant empirical Bayes prior and posterior results.
Initial estimate for null standard errors.
Relevant empirical Bayes prior results.
Parameters for \(g=N(\mu,\tau^2)\).
Method used for finding the parameter estimates \(\hat{\mu}\) and \(\hat{\tau}^2\) for \(g\).
Reports the LP-coefficients of the relevance function \(d_x(x)\).
Relevant empirical Bayes posterior results.
Posterior mode for \(\pi(\theta|z,\boldsymbol{x})\).
Posterior mean for \(\pi(\theta|z,\boldsymbol{x})\).
Standard error for the posterior mean, when using parametric bootstrap.
The HPD interval for posterior \(\pi(\theta|z,\boldsymbol{x})\).
same as input post.alpha.
The plots for prior and posterior density.
Mukhopadhyay, S., and Wang, K (2021) "On The Problem of Relevance in Statistical Inference". <arXiv:2004.09588>
# NOT RUN {
data(funnel)
X<-funnel$x
z<-funnel$z
X.target=60
z.target=4.49
rEB.out<-rEB.proc(X,z,X.target,z.target,m=c(4,8),
theta.set.prior=seq(-2,2,length.out=200),
theta.set.post=seq(-2,5,length.out=200),
centering=TRUE,m.EB=6,nsample=1000)
rEB.out$plots$rEB.post
rEB.out$plots$rEB.prior
# }
Run the code above in your browser using DataLab