# dens.prod.ordi: computes the probability of a given discrete measurement... In LCAextend: Latent Class Analysis (LCA) with Familial Dependence in Extended Pedigrees

## Description

computes the probability of an individual's discrete measurement vector for all latent classes under a multinomial distribution product, eventually taking covariates into account. This is an internal function not meant to be called by the user.

## Usage

 `1` ```dens.prod.ordi(y.x, param, var.list = NULL) ```

## Arguments

 ` y.x ` a vector `y` of values of the ordinal variables (measurements) followed by the values `x` of covariates, if any, ` param ` a list of the parameters alpha (cumulative logistic coefficients), see `init.ordi`, ` var.list ` a list of integers indicating which covariates (taken from `x`) are used for a given type of measurement.

## Details

If there are `K` latent classes, `d` measurements and each measurement has `S[j]` possible values, `alpha` is a list of `d` elements, each is a `K` times `S[j]+length{var.list[[j]]}` matrix. For a class `C=k`, `dens[k]=` \code{dens[k]=prod_{j=1,...,d}P(Y_j=y_j)}, where P(Y_j=y_j|C=k,X_j=x_j) is computed from the cumulative logistic coefficients `alpha[[j]][k,]` and covariates `x[var.list[[j]]]`,

## Value

The function returns a vector `dens` of length `K`, where `dens[k]` is the probability of measurement vector `y` with covariates `x`, if the individual belongs to class `k`.

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