init.norm: computes initial values for the EM algorithm in the case of continuous measurements
Description
computes initial values of means and variance-covariance matrices for the EM algorithm in the case of continuous measurements and multinormal model.
Usage
init.norm(y, K, x = NULL, var.list = NULL)
Arguments
y
a n times d matrix of continuous measurements, where n is the number of indivduals and d is the number of measurements.
All entries must be finite, if not an error is produced,
K
number of latent classes of the model,
x
a matrix of covariates if any, default is NULL (no covariates),
var.list
a list of integers indicating which covariates (taken from x) are used for a given measurement (a column of y).
Value
The function returns a list of 2 elements mu and sigma of length K each, mu[k] is the means vector
(of length d) of measurements in class k and sigma[k] is the variances-covariances matrix
(of dimension d times d) of measurements in class k.
Details
The function allocates every individual to a class by a simple
clustering of the data and evaluates the means and variance-covariance matrices of
measurements in each class. Treatment of covariates is not yet implemented, and any
provided covariate value will be ignored.