get.ab {icmm} | R Documentation |
a
and b
.This function estimates the hyperparameters a
and b
for the Ising prior. This function is for internal use called by the icmm
function.
get.ab(beta, structure, edgeind)
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 |
Estimate hyperparameters, a
and b
, using maximum pseudolikelihood estimators.
Return a two-dimensional vector where the fist element is a
and the second element is b
.
Vitara Pungpapong, Min Zhang, Dabao Zhang
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]))
hyperparameter<-get.ab(beta=beta, structure=linearrelation, edgeind=edgeind)