bvs_task: Variational Bayes Variable Selection Problem

View source: R/bvs_task.R

bvs_taskR Documentation

Variational Bayes Variable Selection Problem

Description

A function that will generate the task list for variational Bayes variable selection problem. Once ran, it will generate a simulated data that logit(p_i) = -1 - Z_{i1} - Z_{i2} + X_i^T β, where Z_i1, Z_i2 are independent standard normal variable. β are i.i.d follow Normal(0, 0.25) but some of them are set to be zero X where drawn independently from Binomial(2, p) where p is uniform over (0.05, 0.5)

Usage

bvs_task(n = 400, p = 1000, sd = 0.1, rate = 0.1)

Arguments

n

Number of rows in simulated data

p

Number of predictors in simulated data

sd

Standard deviation used in random initialize function

rate

Only floor(rate * p) components in β will be non-zero

Value

A list containing all components needed for benchmarking the problem

initfn

Parameter random initializing function

fixptfn

Updating function for the fixed point iteration problem

objfn

Function calculating the objective value for current parameter

...

Other arguments required in functions above

References

Carbonetto P, Stephens M, et al. (2012). Scalable variational inference for Bayesian variable selection in regression, and its accuracy in genetic association studies. Bayesian Analysis, 7(1): 73–108.

Examples

## Not run: 
set.seed(54321)
problem = bvs_task(n=200, p=2000, rate=0.1)
benchmark(
  problem,
  algorithm=c("raw", "squarem", "daarem", "pem", "qn", "nes"),
  ntimes = 200
)

## End(Not run)


bhtang127/AccelBenchmark documentation built on May 30, 2022, 2:21 a.m.