MBASIC.state: Bayesian clustering model for a state-space matrix.

Description Usage Arguments Details Value Author(s) Examples

Description

This function clusters a state-space matrix.

Usage

1
2
3
MBASIC.state(Theta, J, struct = NULL, method = "SE-MC", zeta = 0.1,
  maxitr = 100, tol = 1e-10, tol.par = 0.001, para = NULL, out = NULL,
  W.init = NULL, Z.init = NULL, P.init = NULL, b.init = NULL)

Arguments

Theta

A K by I matrix. The (k,i)-th entry is the state of the i-th unit under condition k. Notice that the sorted distinct values of entries in this matrix must be 1,2,...,S, where S is the total number of states.

J

The number of clusters to be identified.

struct

A K by J matrix indicating the structures of each cluster.

method

A string for the fitting method, 'SE-HC' or 'SE-MC'(default).

zeta

The initial value for the proportion of units that are not clustered. Default: 0.1.

maxitr

The maximum number of iterations in the E-M algorithm. Default: 100.

tol

Tolerance for error in checking the E-M algorithm's convergence. Default: 1e-04.

para

A list object that contains the true model parameters. Default: NULL. See details for more information.

out

The file directory for writing fitting information in each E-M iteration. Default: NULL (no information is outputted).

Details

The method argument determines what fitting method will be used. The default is 'SE-MC', where an E-M algorithm is used for clustering. If 'SE-HC', then hierarchical clustering is used.
The para argument takes a list object that is supposed to include the following fields:

W A K by (J*S) matrix. The (k,J*(s-1)+j)-th entry is the probability that the units in cluster j has state s in the k-th experiment.
Z An I by J matrix. The (i,j)-th entry is the indicator whether the i-th unit belongs to cluster j.
non.id A binary vector of length I. The i-th entry is the indicator whether the i-th unit does not belong to any cluster.

This argument is intended to carry the true parameters in simulation studies. If it is not null, then the model also computes a number of metrics that describes the error in model fitting. Users should be cautious that the order of the rows and columns of matrices in the fields of para should match the Y matrix.

Value

An object of class MBASICFit.

Author(s)

Chandler Zuo zuo@stat.wisc.edu

Examples

1
2
state.sim <- MBASIC.sim.state(I = 1000, K = 10, J = 4, S = 3, zeta = 0.1)
state.sim.fit <- MBASIC.state(Theta = state.sim$Theta, J = 4, method = "SE-MC", zeta = 0.1, maxitr = 100, tol = 1e-6)

chandlerzuo/mbasic documentation built on May 13, 2019, 3:24 p.m.