View source: R/CommonFunction.R
GroupProb | R Documentation |
GroupProb
calculate the membership probability of each value of the data.
GroupProb(Obj, Y, A, TCOV = NULL, X = NULL)
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. |
a real matrix. For each individual i in the data, this matrix contained the membership probability of each group.
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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.