Description Usage Arguments Details Value Note Author(s) References See Also Examples
Conducts a greedy forward stepwise search to identify the optimal MoEClust
model according to some criterion
. Components and/or gating
covariates and/or expert
covariates are added to new MoE_clust
fits at each step, while each step is evaluated for all valid modelNames
.
1 2 3 4 5 6 7 8 9 10 11 |
data |
A numeric vector, matrix, or data frame of observations. Categorical variables are not allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables. |
network.data |
An optional matrix or data frame in which to look for the covariates specified in the |
gating |
A vector giving the names of columns in If |
expert |
A vector giving the names of columns in If |
modelNames |
A character string or valid model names, to be used to restrict the size of the search space, if desired. By default, all valid model types are explored. Rather than considered the changing of the model type as an additional step, every step is evaluated over all entries in |
noise |
A logical indicating whether to assume all models contain an additional noise component ( |
criterion |
The model selection criterion used to determine the optimal action at each step. Defaults to |
equalPro |
A character string indicating whether models with equal mixing proportions should be considered. Considering |
noise.gate |
A character string indicating whether models where the gating network for the noise component depends on covariates are considered. Considering |
verbose |
Logical indicating whether to print messages pertaining to progress to the screen during fitting. By default is |
... |
Additional arguments to |
The arguments modelNames
, equalPro
, and noise.gate
are provided for computational convenience. They can be used to reduce the number of models under consideration at each stage.
The same is true of the arguments gating
and expert
, which can each separately be made to consider all variables in network.data
, or a subset, or none at all.
Without any prior information, it is best to accept the defaults at the expense of a longer run-time.
An object of class "MoECompare"
containing information on all visited models and the optimal model (accessible via x$optimal
).
It is advised to run this function once with noise=FALSE
and once with noise=TRUE
and then choose the optimal model across both sets of results.
At present, only additions (of components and covariates) are considered. In future updates, it will be possible to allow both additions and removals.
The function will attempt to remove duplicate variables found in both data
and network.data
; in particular, they will be removed from network.data
. Users are however advised to careful specify data
and network.data
such that there are no duplicates, especially if the desired variable(s) should belong to network.data
.
Keefe Murphy - <keefe.murphy@mu.ie>
Murphy, K. and Murphy, T. B. (2020). Gaussian parsimonious clustering models with covariates and a noise component. Advances in Data Analysis and Classification, 14(2): 293-325. <doi: 10.1007/s11634-019-00373-8>.
MoE_clust
, MoE_compare
, MoE_control
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # data(CO2data)
# Search over all models where the single covariate can enter either network
# (mod1 <- MoE_stepwise(CO2data$CO2, CO2data[,"GNP", drop=FALSE]))
#
# data(ais)
# Only look for EVE & EEE models with at most one expert network covariate
# Do not consider any gating covariates
# (mod2 <- MoE_stepwise(ais[,3:7], ais, gating=NA, expert="sex", modelNames=c("EVE", "EEE")))
#
# Look for models with a noise component, unequal mixing proportions,
# and only consider models with a constant mixing proportion for the noise component
# (mod3 <- MoE_stepwise(ais[,3:7], ais, noise=TRUE, gating=c("SSF", "Ht"), expert="sex",
# equalPro="no", noise.gate="no", modelNames="EEE"))
#
# Compare both sets of results (with & without a noise component) for the ais data
# (comp <- MoE_compare(mod2, mod3, optimal.only=TRUE))
# comp$optimal
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.