fit_fm: Fit a finite mixture model

Description Usage Arguments Details

View source: R/fit_fm.R

Description

Fit a finite mixture model using MCMC.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fit_fm(
  X,
  n.sample = 2000,
  n.chains = 2,
  n.thin = 1,
  n.burnin = 800,
  n.adapt = 200,
  raw = FALSE,
  runjags.method = "rjags",
  silent = FALSE,
  gold.std = FALSE
)

Arguments

X

(matrix) Data set.

n.sample

Number of MCMC samples.

n.chains

Number of chains.

n.thin

Thinning value.

n.burnin

Number of burn-in.

n.adapt

Number of adaptation samples.

raw

(logical) Return the randomLCA or runjags object?

runjags.method

Parallel or normal method. See runjags documentation.

silent

(logical) Suppress output.

Details

Uninformative priors are used, e.g. Unif(0, 1) for probabilities. Initial value for the prevalence is set at 0.1, the disease indicators to zero for all units, probabilities of correctly diagnosing patients (eta) to 0.1, and probabilities of the tests correctly diagnosing patients when the patient truly has or does not have the diseas as 0.9 and 0.7 respectively.

Note that when gold.std is TRUE, then the last column in X is assumed to be the gold standard item responses. Thus, the sensitivities and specificities attached to this item is fixed to 1.


haziqj/diagacc documentation built on Nov. 21, 2020, 5:40 p.m.