mmMCMCFit: Fit Mixed Membership models using a Metropolis Hastings...

Description Usage Arguments Details See Also

Description

Takes samples form the posterior distribution of a mixed membership model using a Metropolis-Hastings within Gibbs sampler.

Usage

1
2
3
4
mmMCMCFit(model, burnIn = 20000, samples = 1000, thin = 10, print = 100,
  fileNames = c("theta.csv", "alpha.csv", "ksi.csv", "lambda.csv", "z.csv",
  "p.csv", "rho.csv"), newFiles = 1, omega = 100, eta = 1,
  whichWrite = c(1, 1, 1, 0, 0, 1, 0))

Arguments

model

a mixedMemModelMCMC object created by the mixedMemModelMCMC constructor

burnIn

non-negative integer indicating the number of burn in samples before recording the first sample

samples

positive integer indicating the number of samples to record

thin

positive integer indicating how to thin the samples

print

positive integer indicating how often to print an update to the R console

fileNames

list of files locations to write samples. Should be vector of strings with length 5 (7 if using the extended mixed membership model) corresponding to: Theta, Alpha_0, Ksi, Lambda, Z, (P, rho).

newFiles

0 if samples should be appended to existing files; 1 if samples should overwrite any existing files

omega

tuning parameter for MH step for alpha.

eta

tuning parameter for MH step for ksi

whichWrite

which parameters to write to disk. Writing the individual parameters can significantly increase computational time when the number of individuals is large

extended

boolean whether to estimate the extended model or not

Details

mmMCMCFit draws samples from the posterior distribution of a mixed membership model given a set of observed data. The sampler takes Metropolis Hastings steps to sample the α_0 and ξ parameters and samples the remaining θ, λ_i and Z parameters with a Gibbs sampler.

See Also

mixedMemModelMCMC


ysamwang/mixedMem documentation built on May 4, 2019, 5:33 p.m.