Learn R Programming

icmm (version 1.2)

get.sigma: Standard deviation estimation.

Description

This function estimates the standard deviation when family="gaussian". This function is for internal use called by the icmm function.

Usage

get.sigma(Y, X, beta, alpha)

Arguments

Y

an (n*1) numeric matrix of responses.

X

an (n*p) numeric design matrix.

beta

a (p*1) matrix of regression coefficients.

alpha

a scalar value of hyperparmeter alpha.

Value

Return a scalar value of standard deviation.

Details

Estimate standard deviation as the mode of its full conditional distribution function when specify family="gaussian". This function is for internal use called by the icmm function.

Examples

Run this code
# NOT RUN {
data(simGaussian)
Y<-as.matrix(simGaussian[,1])
X<-as.matrix(simGaussian[,-1])
alpha<-0.5
# Obtain initial values from lasso
data(initbetaGaussian)
beta<-as.matrix(initbetaGaussian)
# Obtain sigma
# }
# NOT RUN {
sigma<-get.sigma(Y=Y, X=X, beta=beta, alpha=alpha)
# }

Run the code above in your browser using DataLab