metropLambda: Metropolis-Hastings algorithm to sample lambda with a Beta...

Description Usage Arguments Details Value Author(s) References Examples

Description

Metropolis-Hastings algorithm to sample lambda with a Beta prior from (de los Campos et al., 2009) for the Bayesian Lasso regression model.

Usage

1
metropLambda(tau2, lambda, shape1 = 1.2, shape2 = 1.2, max = 200, ncp = 0)

Arguments

tau2

Latent parameter tau-squared to form the Laplace prior on the coefficients of the Lasso from a normal-mixture.

lambda

Initial value for lambda.

shape1

First shape parameter for the Beta distribution.

shape2

Second shape parameter for the Beta distribution.

max

Maximum value of lambda.

ncp

Dummy parameter.

Details

Metropolis-Hastings algorithm to sample lambda with a Beta prior from (de los Campos et al., 2009) for the Bayesian Lasso regression model.

Value

Returns a value for lambda to use in the Gibbs samplers of the functions in the SafeBayes package.

Author(s)

Copied from (de los Campos et al., 2009).

References

de los Campos G., H. Naya, D. Gianola, J. Crossa, A. Legarra, E. Manfredi, K. Weigel and J. Cotes. 2009. Predicting Quantitative Traits with Regression Models for Dense Molecular Markers and Pedigree. Genetics 182: 375-385.

Examples

1
2
3
4
5
6
rm(list=ls())
library(SafeBayes)
tau2 <- 1/4
lambda <- 50

metropLambda(tau2=tau2, lambda=lambda)

Example output

[1] 2.104193

SafeBayes documentation built on May 1, 2019, 9:23 p.m.