check_CIbound {eshrink}R Documentation

Confidence intervals for 'fLoss' estimators

Description

Compute confidence intervals by 'inverting the test' to determine if a given value should lie in the confidence region.

Usage

check_CIbound(
  testBeta,
  obsEst,
  type = c("ridge", "lasso"),
  postParam,
  lambdaseq,
  X,
  nPost,
  ind = 1,
  Bstar = 100,
  B = 500,
  loss = "fMBV",
  lowerBound = TRUE,
  reproducible = TRUE,
  alpha = 0.025,
  returnDist = FALSE,
  ...
)

invertTest(
  interval,
  type = "ridge",
  lower.interval = interval,
  upper.interval = interval,
  ...,
  tol = 0.005,
  fulldetail = FALSE
)

Arguments

testBeta

Candidate value of beta to test.

obsEst

Estimate of beta from the observed data for which a confidence interval is desired

type

String indicating "ridge" or "LASSO".

postParam

List of parameters for the posterior distribution of beta. See samplePosterior for expected names.

lambdaseq

Sequence of penalty values

X

deisgn matrix

nPost

Number of posterior samples to use.

ind

Index of parameter to test. Defaults to 1.

Bstar

Number of estimators to compute for comparison distribution. Larger values improve the precision of the procedure but increase computational cost.

B

Passed to festLASSO

loss

Either "fMBV" or "fMSE".

lowerBound

Logical indicating that the test is for a lower bound

reproducible

Should the simulated datasets be reproducible?

alpha

Percentile of the distribution to compare against. See details.

returnDist

If TRUE, then distribution of estimates generated is returned instead of comparison against alpha

...

In invertTest, these are passed to check_CIbound. In check_CIbound, these arguments are passed to samplePosterior.

interval

Interval to check. Used for both upper and lower bound, if they are not provided

lower.interval, upper.interval

Bounding intervals over which to check for lower and upper endpoints of CI

tol

Passed to uniroot

fulldetail

If TRUE, then output from uniroot is included.

Details

This function is used as part of an 'inverting the test' approach to generate confidence intervals for estimators from festRidge. Bstar datasets are generated from slices of the posterior distribution of the model parameters where beta (or other parameter indicated by ind) is fixed at the value testBeta. For each dataset, beta is estimated via festRidge or festLASSO, and the resulting distribution of estimators is compared against the estimate from the observed data (obsEst).

The values of lambdaseq, X, nPost, and loss are passed to festRidge or festLASSO and typically match the values that were used to compute obsEst.

The computational cost of this function is most affected by the values of nPost and Bstar. Large values of the latter are important for adequately representing the distribution of parameter estimates. In some settings, nPost can be reduced without substantially impacting the results. However, each dataset is likely to be different.

Author(s)

Joshua Keller

See Also

festRidge


[Package eshrink version 0.1.2 Index]