Although the starting parameter list P may be specified directly, Note also that any matrices specified must be positive definite. This function calculates an initial P from D and a starting value for Z.

initParamList(D, Z)

Arguments

D

an object of class multimixSettings---see data_organise for details.

Z

an \(n \times q\) matrix, where \(n\) is the number of rows of dframe and \(q\) is the number of components in the mixture. During the fitting \(Z_{ij}\) holds the currently estimated probability that observation \(i\) belongs to component \(j\). Often Z is initialized to a matrix of indicator columns for a partition of the data. It is also common to initialize Z to be the final Z from the fitting of a simpler model.

Value

an object of class multimixParamList which is a list

with the following elements:

  • dstat -- list of matrices for each discrete variable not included in a location model. The matrix for each discrete variable is made up of a column of length \(q\) for each level (value) of the variable giving the expected proportion of each level (column) for each mixture component (row). Rows sum to 1.

  • ldstat -- list of matrices for each discrete variable within a location model. The matrix for each discrete variable is made up of a column of length \(q\) for each level (value) of the variable giving the expected proportion of each level (column) for each mixture component (row). Rows sum to 1.

  • ostat -- matrix with a column for each continuous variable outside any location mode whose \(q\) rows give the current estimated mean for each mixture component.

  • ostat2 -- matrix with a column for each continuous variable outside any location mode whose \(q\)rows give the current estimated mean square for each mixture component.

  • osvar -- matrix with a column for each continuous variable outside any location mode whose \(q\) rows give the current estimated variance for each mixture component.

  • cstat -- list with a member for each nontrivial, fully continuous, partition cell, that is not including discrete cells or cells listed in lcdep, each member being a matrix with a column for each continuous variable in that cell, whose \(q\) rows give the current estimated mean for each mixture component.

  • cstat2 -- list with a member for each nontrivial, fully continuous, partition cell, each member being a matrix with a column for each continuous variable in that cell, whose \(q\) rows give the current estimated mean square for each mixture component.

  • cvar -- list with a member for each nontrivial, fully continuous, partition cell, each member being a matrix with a column for each continuous variable in that cell, whose \(q\) rows give the current estimated variance for each mixture component.

  • cpstat -- list with a member for each nontrivial, fully continuous, partition cell, each member being the matrix with rows for each of the \(q\) mixture components and columns for each pair of continuous variables in that cell, as ordered by pair.index. The matrix elements are the currently expected products of the variable pairs arranged by component and pair.

  • ccov -- list with a member for each nontrivial, fully continuous, partition cell, each member being the matrix with rows for each of the \(q\) mixture components and columns for each pair of continuous variables in that cell, as ordered by pair.index. The matrix elements are the currently expected covariances of the variable pairs arranged by component and pair.

  • MVMV -- list with a member for each nontrivial, fully continuous, partition cell, each member being a list with members for each of the \(q\) mixture components whose values are the covariance matrix estimates for that cell and component.

  • lcstat -- list with a member for location partition cell, each member being a matrix with a column for each continuous variable in that cell, whose \(q\) rows give the current estimated mean for each mixture component.

  • lcstat2 -- list with a member for location partition cell, each member being a matrix with a column for each continuous variable in that cell, whose \(q\) rows give the current estimated mean square for each mixture component.

  • lcpstat -- list with a member for each location cell, each member being the matrix with rows for each of the \(q\) mixture components and columns for each pair of continuous variables in that cell, as ordered by pair.index. The matrix elements are the currently expected products of the variable pairs arranged by component and pair.

  • lccov -- list with a member for each location cell, each member being the matrix with rows for each of the \(q\) mixture components and columns for each pair of continuous variables in that cell, as ordered by pair.index. The matrix elements are the currently estimated covariances of the variable pairs arranged by component and pair.

  • ldxcstat -- list with a member for each location partition cell, each member being a list with a member for each level of the cell's discrete variable that member being a matrix of mean values of the continuous variables for each level-class combination.

  • pistat -- vector containing estimates of population proportion in each cluster; column means of \(Z\) matrix.

  • W -- matrix of weights of observation \(i\) in cluster \(j\); the columns of the \(Z\) matrix are each multiplied by constant to give \(W\) columns summing to 1.