get_MEDseq_results {MEDseq} | R Documentation |
Extract results from a MEDseq model
Description
Utility function for extracting results of submodels from "MEDseq"
objects when a range of models were run via MEDseq_fit
.
Usage
get_MEDseq_results(x,
what = c("z", "MAP", "DBS", "ASW"),
rank = 1L,
criterion = c("bic", "icl", "aic", "dbs",
"asw", "cv", "nec", "loglik"),
G = NULL,
modtype = NULL,
noise = TRUE,
...)
Arguments
x |
An object of class |
what |
A character string indicating the desired results to extract. |
rank |
A number indicating what |
criterion |
The |
G |
Optional argument giving the number of components in the model for which results are desired. Can be supplied with or without also specifying |
modtype |
Optional argument giving the desired model type for which results are desired. Can be supplied with or without also specifying |
noise |
A logical indicating whether models with a noise component should be considered. Defaults to |
... |
Catches unused arguments. |
Details
The arguments rank
and criterion
are invoked when one or more of the arguments G
and modtype
are missing. Thus, supplying G
and modtype
allows rank
and criterion
to be bypassed entirely.
Value
The desired results extracted from the MEDseq
model.
Note
Arguments to this function can be supplied to plot.MEDseq
via the ...
construct.
Author(s)
Keefe Murphy - <keefe.murphy@mu.ie>
See Also
Examples
data(biofam)
# mod <- MEDseq_fit(seqdef(biofam[10:25] + 1L), G=9:10)
# Extract the MAP clustering of the best 9-cluster model according to the asw criterion
# get_MEDseq_results(mod, what="MAP", G=9, criterion="asw")
# Extract the DBS values of the best UUN model according to the dbs criterion
# get_MEDseq_results(mod, what="DBS", modtype="UUN", criterion="dbs")
# Plot the DBS values of this same model, by passing get_MEDseq_results arguments through plot
# plot(mod, type="dbsvals", modtype="UUN", criterion="dbs")