Description Usage Arguments Details Value References Examples

`hdIS`

computes importance weights using samples
drawn by `PBsampler`

. See the examples
below for details.

1 2 |

`PBsample` |
bootstrap samples of class |

`PETarget, sig2Target, lbdTarget` |
parameters of target distribution. (point estimate of beta or E(y), estimated variance of error and lambda) |

`TsA.method` |
method to construct T(eta(s),A) matrix. See Zhou and Min(2016) for details. |

`log` |
logical. If |

`parallel` |
logical. If |

`ncores` |
integer. The number of cores to use for parallelization. |

computes importance weights which is defined as

*\frac{target
density}{proposal density}*

, when the samples are drawn from the proposal
distribution with the function `PBsampler`

while the parameters of
the target distribution are (PETarget, sig2Target, lbdTarget).

importance weights of the proposed samples.

Zhou, Q. (2014), "Monte Carlo simulation for Lasso-type problems by estimator augmentation," Journal of the American Statistical Association, 109, 1495-1516.

Zhou, Q. and Min, S. (2017), "Estimator augmentation with applications in high-dimensional group inference," Electronic Journal of Statistics, 11(2), 3039-3080.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ```
set.seed(1234)
n <- 10
p <- 30
Niter <- 10
Group <- rep(1:(p/10), each = 10)
Weights <- rep(1, p/10)
x <- matrix(rnorm(n*p), n)
# Target distribution parameter
PETarget <- rep(0, p)
sig2Target <- .5
lbdTarget <- .37
#
# Using non-mixture distribution
# ------------------------------
## Proposal distribution parameter
PEProp1 <- rep(1, p)
sig2Prop1 <- .5
lbdProp1 <- 1
PB <- PBsampler(X = x, PE_1 = PEProp1, sig2_1 = sig2Prop1,
lbd_1 = lbdProp1, weights = Weights, group = Group, niter = Niter,
type="grlasso", PEtype = "coeff")
hdIS(PB, PETarget = PETarget, sig2Target = sig2Target, lbdTarget = lbdTarget,
log = TRUE)
#
# Using mixture distribution
# ------------------------------
# Target distribution parameters (coeff, sig2, lbd) = (rep(0,p), .5, .37)
# Proposal distribution parameters
# (coeff, sig2, lbd) = (rep(0,p), .5, .37) & (rep(1,p), 1, .5)
#
#
PEProp1 <- rep(0,p); PEProp2 <- rep(1,p)
sig2Prop1 <- .5; sig2Prop2 <- 1
lbdProp1 <- .37; lbdProp2 <- .5
PBMixture <- PBsampler(X = x, PE_1 = PEProp1,
sig2_1 = sig2Prop1, lbd_1 = lbdProp1, PE_2 = PEProp2,
sig2_2 = sig2Prop2, lbd_2 = lbdProp2, weights = Weights, group = Group,
niter = Niter, type = "grlasso", PEtype = "coeff")
hdIS(PBMixture, PETarget = PETarget, sig2Target = sig2Target, lbdTarget = lbdTarget,
log = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.