get.alpha: Hyperparameter estimation for 'alpha'.

Description Usage Arguments Details Value Author(s) Examples

View source: R/get.alpha.R

Description

This function estimates a hyperparameter alpha, a scale parameter in Laplace denstiy. This function is for internal use called by the icmm function.

Usage

1
get.alpha(beta, scaledfactor)

Arguments

beta

a (p*1) matrix of regression coefficients.

scaledfactor

a scalar value of multiplicative factor.

Details

This function estimates a hyperparameter alpha, a scale parameter in Laplace density as the mode of its full conditional distribution function.

Value

Return a scalar value of alpha.

Author(s)

Vitara Pungpapong, Min Zhang, Dabao Zhang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(simGaussian)
Y<-as.matrix(simGaussian[,1])
X<-as.matrix(simGaussian[,-1])
n<-dim(X)[1]
# Obtain initial values of beta from lasso
data(initbetaGaussian)
beta<-as.matrix(initbetaGaussian)
# Initiate alpha
alpha<-0.5
# Estimate sigma
e<-Y-X%*%beta
nz<-sum(beta[,1]!=0)
sigma<-get.sigma(Y=Y, X=X, beta=beta, alpha=alpha)
# Update alpha as the mode of its full conditional distribution function
alpha<-get.alpha(beta=beta, scaledfactor=1/(sqrt(n-1)*sum(abs(beta))/sigma))

icmm documentation built on May 26, 2021, 9:06 a.m.