fit_lc: Fit a latent class model

Description Usage Arguments Details

View source: R/fit_lc.R

Description

Fit a latent class model using MCMC.

Usage

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

Arguments

X

(Matrix) Item responses 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.

calcSE

(logical) Calculate standard error of estimates for randomLCA fit.

gold.std

(Logical) Is the last item/column in X the gold standard?

method

(DEPRECATED–Use MCMC only) EM algorithm or MCMC.

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, and the sensitivities and specificities to 0.9.

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.