Learn R Programming

celda (version 0.0.0.9000)

getModel: Select the best model amongst a list of models generated in a celda run.

Description

Select the best model amongst a list of models generated in a celda run.

Usage

getModel(celda.list, K = NULL, L = NULL, chain = NULL, best = "loglik")

Arguments

celda.list

A celda_list object returned from celda()

K

The K parameter for the desired model in the results list. Defaults to NULL.

L

The L parameter for the desired model in the results list. Defaults to NULL.

chain

The desired chain for the specified model. Defaults to NULL. Overrides best parameter if provided.

best

Method for choosing best chain automatically. Options are c("perplexity", "loglik"). See documentation for chooseBestModel for details. Defaults to "loglik."

Value

A celda model object matching the provided parameters (of class "celda_C", "celda_G", "celda_CG" accordingly), or NA if one is not found.