| data_organise {multimix} | R Documentation |
Prepare data for use with multimix
Description
Prepare data for use with multimix
Usage
data_organise(
dframe,
numClusters,
numIter = 1000,
cdep = NULL,
lcdep = NULL,
minpstar = 1e-09
)
Arguments
dframe |
a data frame containing the data set you wish to model. |
numClusters |
the clusters you wish to fit. |
numIter |
the maximum number of steps to that the EM agorithm will run before terminating. |
cdep |
a list of multivariate normal cells. |
lcdep |
a list of location cells. |
minpstar |
Minimum denominator for application of Bayes Rule. |
Value
An object of class multimixSettings which is a list
with the following elements:
cdep— a list of multivariate normal cells.clink— column numbers of univariate normal variables.cprods— a list over MVN cells containing a matrix of pair-wise products of columns in the cell, columns ordered bypair.index.cvals— a list over MVN cells containing a matrix of columns of variables in the cellcvals2— a list over MVN cells containing a matrix of squared columns of variables in the celldframe— thedata.frameof variablesdiscvar— logical: the variable is takes values of eitherTRUEorFALSEdlevs— for discrete cells: number of levelsdlink— column numbers of univariate discrete variablesdvals— a list over discrete cells of level indicator matriceslc— logical: is continuous variable belonging to OT cellTRUE/FALSElcdep— a list of OT cellslcdisc— column numbers of discrete variables in OT cellslclink— column numbers of continuous variables in OT cellslcprods— a list over OT cells containing a matrix of pair-wise products of continuous columns in the cell, columns ordered bypair.indexlcvals— a list over OT cells containing a matrix of continuous columns of variables in the celllcvals2— a list over OT cells containing a matrix of squared continuous columns of variables in the cellld— logical: is discrete variable belonging to OT cellTRUE/FALSEldlevs— for discrete variables in OT cells: number of levelsldlink— a column numbers of OT discrete variablesldvals— a list over OT cells of level indicator matricesldxc— a list over OT cells whose members are lists over levels of matrices of the cell continuous variables whose columns are multiplied by the level indicator columnmc— logical: is continuous variable not in OT cellTRUE/FALSEmd— logical: is discrete variable not in OT cellTRUE/FALSEminpstar— minimum denominator for appliction of Bayes' Rulen— number of observationsnumIter— the maximum number of steps to that the EM agorithm will run before terminatingoc— logical: is continuous variable in univariate cellTRUE/FALSEolink— column numbers of continuous univariate cellsop—length(olink)ovals—nbyopmatrix of continuous univariate variablesovals2—nbyopmatrix of squared continuous univariate variablesnumClusters— the number of clusters in the model.
Author(s)
Murray Jorgensen
Examples
data(cancer.df)
D = data_organise(cancer.df, numClusters = 2)