Skip to contents

Bayesian LASSO (Park & Casella 2008 short Gibbs)

Usage

morie_bayesian_lasso_full(
  x,
  y,
  n_iter = 200,
  burn = 50,
  lam = NULL,
  seed = 0,
  deterministic_seed = NULL
)

Arguments

x

(n x p) marker matrix.

y

Numeric response.

n_iter

Total iterations (default 200).

burn

Burn-in (default 50).

lam

Optional fixed lambda (else empirical-Bayes updated).

seed

Random seed.

deterministic_seed

Optional integer; if supplied, RNG state is derived via morie_det_rng() keyed on ("blasf", deterministic_seed) so Py<->R streams agree on the canonical fixture. When NULL (default) behaviour is unchanged.

Value

list(estimate, beta, intercept, se, beta_se, lam, sigma2, n_iter, n, p, method).

References

Park & Casella (2008) JASA 103:681. Montesinos Lopez Ch 4.

Examples

morie_bayesian_lasso_full(
  x = matrix(rnorm(150), 50, 3), y = rnorm(50),
  n_iter = 50L, burn = 10L, lam = 1, seed = 1L,
  deterministic_seed = TRUE
)
#> $estimate
#> [1] 0.1539212
#> 
#> $beta
#> [1] -0.02252016  0.27328404  0.16595948
#> 
#> $intercept
#> [1] -0.2564633
#> 
#> $se
#> [1] 0.1909084
#> 
#> $beta_se
#> [1] 0.1709333 0.2296191 0.1721728
#> 
#> $lam
#> [1] 1
#> 
#> $sigma2
#> [1] 1.196858
#> 
#> $n_iter
#> [1] 40
#> 
#> $n
#> [1] 50
#> 
#> $p
#> [1] 3
#> 
#> $method
#> [1] "Bayesian LASSO (Park-Casella short Gibbs)"
#>