Description Usage Arguments Details Value See Also Examples

View source: R/dens.prod.ordi.R

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.

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

` y.x ` |
a vector |

` param ` |
a list of the parameters alpha (cumulative logistic coefficients), see |

` var.list ` |
a list of integers indicating which covariates (taken from |

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]]]`

,

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.