R/GDM_stHM.R

GDM_stHM <-
function(hist_var,N,control)
{
    breakPoint = quantile(hist_var, (1:N)/N )
    
    groupID = findInterval(hist_var, breakPoint,rightmost.closed = TRUE)
    
    groupRes = unname(by(control,groupID,bayesHierVar.stHM) )
    
    mean(sapply(groupRes,sd))
}
benliemory/adaptiveHM documentation built on May 12, 2019, 12:57 p.m.