GroupProb {trajeR} | R Documentation |
Membership's probabilities
Description
GroupProb
calculate the membership probability of each value of the data.
Usage
GroupProb(Obj, Y, A, TCOV = NULL, X = NULL)
Arguments
Obj |
Trajectory's object. A trajectory object that is return by |
Y |
Matrix. A real matrix. The data. |
A |
Matrix. A real matrix. The time variable. |
TCOV |
Matrix. A real matrix. Optional, by default the value is NULL. It contained the time dependent covariate. |
X |
Matrix. A real matrix. Optional, by default the value is NULL. It contained a covariate that modify the probability membership. |
Value
a real matrix. For each individual i in the data, this matrix contained the membership probability of each group.
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")
GroupProb(sol, Y = data[, 2:6], A = data[, 7:11])
[Package trajeR version 0.11.1 Index]