Learn R Programming

SEPaLS (version 0.1.0)

bootstrap.SEPaLS: Bootstrap function for SEPaLS estimator.

Description

Bootstrap function for SEPaLS estimator.

Usage

bootstrap.SEPaLS(
  X,
  Y,
  yn,
  type = c("vMF", "Laplace"),
  mu0 = NULL,
  kappa0 = NULL,
  lambda = NULL,
  B = 20
)

Value

A list with two elements:

  • ws: A \((B\times p)\)-dimensional matrix with each row corresponding to the SEPaLS direction estimated on each bootstrap sample.

  • cor: The correlation of each estimate direction on the Out-Of-Bag (OOB) sample with the response.

Arguments

X

\((n\times p)\)-dimensional matrix of the covariates.

Y

\((n)\)-dimensional vector of the response.

yn

\(y_n\) the quantile corresponding to lowest values of \(Y\)s to put in the tail.

type

character, whether vMF for von Mises-Fisher prior or Laplace for Laplace prior. See details.

mu0

\(\mu_0\), unitary \((p)\)-dimensional vector. The direction parameter for the vMF prior.

kappa0

\(\kappa_0\), positive. The concentration parameter for the vMF prior.

lambda

\(\lambda\), positive. The concentration parameter for the Laplace prior.

B

positive integer. The number of bootstrap samples on which estimate the SEPaLS directions. Default to 20.

See Also

SEPaLS

Examples

Run this code
set.seed(5)
n <- 3000
p <- 10
X <- matrix(rnorm(n*p),n,p)
beta <- c(5:1,rep(0,p-5)) ; beta <- beta/sqrt(sum(beta^2))
Y <- (X%*%beta)^3 + rnorm(n)
boot.sepals_Laplace <- bootstrap.SEPaLS(X,Y,yn=1,type="Laplace",lambda=0.01,
B=100)
boxplot(boot.sepals_Laplace$ws);abline(h=0,col="red",lty=2)

Run the code above in your browser using DataLab