Learn R Programming

trajeR (version 0.9.0.5)

GroupProb: 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 trajeR function.

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

Run this code
# NOT RUN {
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])
# }

Run the code above in your browser using DataLab