initParamList: Initialise the parameter list.

View source: R/initParamList.R

initParamListR Documentation

Initialise the parameter list.

Description

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.

Usage

initParamList(D, Z)

Arguments

D

an object of class multimixSettings—see data_organise for details.

Z

an n by q matrix, where n is the number of rows of dframe and q is the number of components in the mixture. During the fitting Zij 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:

  • dstatlist 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.

  • ldstatlist 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.

  • ostatmatrix with a column for each continuous variable outside any location mode whose q rows give the current estimated mean for each mixture component.

  • ostat2matrix with a column for each continuous variable outside any location mode whose qrows give the current estimated mean square for each mixture component.

  • osvarmatrix with a column for each continuous variable outside any location mode whose q rows give the current estimated variance for each mixture component.

  • cstatlist 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.

  • cstat2list 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.

  • cvarlist 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.

  • cpstatlist 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.

  • ccovlist 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.

  • MVMVlist 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.

  • lcstatlist 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.

  • lcstat2list 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.

  • lcpstatlist 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.

  • lccovlist 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.

  • ldxcstatlist 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.

  • pistatvector containing estimates of population proportion in each cluster; column means of Z matrix.

  • Wmatrix 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.


multimix documentation built on Jan. 22, 2023, 1:13 a.m.