AvePP: Average Posterior Probability

View source: R/model_adequacy.R

AvePPR Documentation

Average Posterior Probability

Description

Calculate the Average Posterior Probability. Average Posterior Probability (AvePP) is the average posterior probability of membership for each group for those individuals that were assigned to.

Usage

AvePP(sol, Y, A, X = NULL)

Arguments

sol

Trajectory's object. An object of type Trajectory.

Y

Matrix. A matrix containing the variables in the model.

A

Matrix. A matrix containing the time variable data.

X

Matrix. An optional matrix that modifies the probability of belong to group. By default its value is a one column matrix with value 1.

Value

A vector of reals. The average posterior probability.

Examples

data = read.csv(system.file("extdata", "CNORM2gr.csv", package = "trajeR"))
data = as.matrix(data)
sol = trajeR(Y = data[, 2:6], A = data[, 7:11], degre = c(2,2), Model = "CNORM", Method = "EM")
AvePP(sol, Y = data[, 2:6], A = data[, 7:11])

trajeR documentation built on March 18, 2022, 6:12 p.m.