Nothing
#' @include model.R
setClass('lcModelMixAK_GLMMlist', contains = 'lcModel')
#' @rdname interface-mixAK
setMethod('postprob', 'lcModelMixAK_GLMMlist', function(object, ...) {
models = getGLMM_MCMCs(object)
pp = Reduce('+', lapply(models, .postprob_GLMM_MCMC)) / length(models)
colnames(pp) = clusterNames(object)
pp
})
#' @rdname interface-mixAK
setMethod('predictForCluster', 'lcModelMixAK_GLMMlist', function(object, newdata, cluster, what = 'mu', ...) {
models = getGLMM_MCMCs(object)
k = match(cluster, clusterNames(object))
Reduce('+', lapply(models, .predictForCluster_GLMM_MCMC,
k = k,
method = getLcMethod(object),
newdata = newdata, ...)) / length(models)
})
coef.lcModelMixAK_GLMMlist = function(object, ...) {
models = getGLMM_MCMCs(object)
Reduce('+', lapply(models, coef, ...)) / length(models)
}
deviance.lcModelMixAK_GLMMlist = function(object) {
models = getGLMM_MCMCs(object)
Reduce('+', lapply(models, deviance)) / length(models)
}
getGLMM_MCMCs = function(object) {
object@model[which(vapply(names(object@model), nchar, FUN.VALUE = 0) == 0)]
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.