rmixedMem {mixedMem} | R Documentation |
Simulate Mixed Membership Data
Description
Simulate data from a mixed membership model.
Usage
rmixedMem(Total, J, Rj, Nijr, K, Vj, dist, theta, alpha, lambda = NULL)
Arguments
Total |
the number of individuals in the sample. |
J |
the number of variables observed on each individual. |
Rj |
a vector of positive integers of length |
Nijr |
an array of dimension ( |
K |
the number of latent sub-populations. |
Vj |
a vector of length |
dist |
a vector of strings of length |
theta |
an 3 way array of dimensions ( |
alpha |
a positive |
lambda |
an optional matrix of dimensions ( |
Details
rmixedMem
simulates data from a mixed membership model given the specified parameters and dimensions. The function
returns a random sample of observations obs
, context indicators Z
, and group membership scores lambda
.
Value
rmixedMem
returns a list containing a three items: A matrix of group memberships scores lambda
,
an array of context indicators Z
and an array of observations obs
.