computes the multinormal density of a given continuous measurement vector for all classes

Share:

Description

computes the density of an individual's continuous measurement vector for all latent classes, eventually taking covariates into account. This is an internal function not meant to be called by the user.

Usage

1
dens.norm(y.x, param, var.list = NULL)

Arguments

y.x

a vector y of values of the measurement followed by the values x of covariates, if any,

param

a list of the multinormal density parameters: means mu and variances-covariances sigma,

var.list

a list of integers indicating which covariates (taken from x) are used for a given type of measurement.

Details

For each class k, the function computes the multinormal density with means param$mu[[k]] and variances-covariances matrix param$sigma[[k]] for the individual's measurement vector. Treatment of covariates is not yet implemented, and any provided covariate value will be ignored.

Value

The function returns a vector dens of length K, where dens[k] is the density of the measurements if the individual belongs to class k.

Examples

1
2
3
4
5
6
7
8
#data
data(ped.cont)
status <- ped.cont[,6]
y <- ped.cont[status==2,7:ncol(ped.cont)]
#param
data(param.cont)
#the function applied for measurement of the first individual in the ped.ordi
dens.norm(y.x=y[1,],param.cont)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.