Learn R Programming

icmm (version 1.2)

get.ab: Hyperparameter estimation for a and b.

Description

This function estimates the hyperparameters a and b for the Ising prior. This function is for internal use called by the icmm function.

Usage

get.ab(beta, structure, edgeind)

Arguments

beta

a (p*1) matrix of regression coefficients.

structure

a data frame stores the information of structure among predictors.

edgeind

a vector stores primary keys of structure.

Value

Return a two-dimensional vector where the fist element is a and the second element is b.

Details

Estimate hyperparameters, a and b, using maximum pseudolikelihood estimators.

Examples

Run this code
# NOT RUN {
data(simGaussian)
data(linearrelation)
Y<-as.matrix(simGaussian[,1])
X<-as.matrix(simGaussian[,-1])
# Suppose obtain beta from lasso
data(initbetaGaussian)
beta<-as.matrix(initbetaGaussian)
edgeind<-sort(unique(linearrelation[,1]))
# }
# NOT RUN {
hyperparameter<-get.ab(beta=beta, structure=linearrelation, edgeind=edgeind)
# }

Run the code above in your browser using DataLab