Description Usage Arguments Details Value Author(s) References Examples
Metropolis-Hastings algorithm to sample lambda with a Beta prior from (de los Campos et al., 2009) for the Bayesian Lasso regression model.
1 | metropLambda(tau2, lambda, shape1 = 1.2, shape2 = 1.2, max = 200, ncp = 0)
|
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. |
Metropolis-Hastings algorithm to sample lambda with a Beta prior from (de los Campos et al., 2009) for the Bayesian Lasso regression model.
Returns a value for lambda to use in the Gibbs samplers of the functions in the SafeBayes package.
Copied from (de los Campos et al., 2009).
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.
1 2 3 4 5 6 | rm(list=ls())
library(SafeBayes)
tau2 <- 1/4
lambda <- 50
metropLambda(tau2=tau2, lambda=lambda)
|
[1] 2.104193
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.