# fit_lcre: Fit a latent class with random effects model In haziqj/diagacc: Modelling Diagnostic Accuracy using Latent Class Models

## Description

Fit a latent class with random effects model using MCMC.

## Usage

 ```1 2 3 4``` ```fit_lcre(X, n.sample = 2000, n.chains = 2, n.thin = 1, n.burnin = 800, n.adapt = 200, raw = FALSE, runjags.method = "rjags", silent = FALSE, quad.points = 21, 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. `quad.points` (numeric, positive) Number of quadrature points for randomLCA fit. Check randomLCA documentation. `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

Priors for probabilities are Unif(0, 1). For the betas, we found that a standard normal prior works best, because assigned a wider range for the betas a priori disrupts the sensitivities and specificities calculations (sticky chains at values close 1). Initial value for the prevalence is set at 0.1, the disease indicators to zero for all units.

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 May 9, 2019, 10:42 a.m.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6080536,"math_prob":0.96972954,"size":1455,"snap":"2019-35-2019-39","text_gpt3_token_len":376,"char_repetition_ratio":0.10820124,"word_repetition_ratio":0.0,"special_character_ratio":0.23367697,"punctuation_ratio":0.15129152,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9884742,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-20T08:28:56Z\",\"WARC-Record-ID\":\"<urn:uuid:865e93d6-1ae4-4e57-a9e0-981c8657f059>\",\"Content-Length\":\"61993\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:edadd9df-ad74-47a4-bf87-ad887636f563>\",\"WARC-Concurrent-To\":\"<urn:uuid:b8c998de-085b-4cbf-a323-08d12b19f100>\",\"WARC-IP-Address\":\"104.28.7.171\",\"WARC-Target-URI\":\"https://rdrr.io/github/haziqj/diagacc/man/fit_lcre.html\",\"WARC-Payload-Digest\":\"sha1:W63CJJG4VXOTKYUMYJDJ4ACPJSYRWRCX\",\"WARC-Block-Digest\":\"sha1:LANXWRRRJKFGMTQENYRTX3L2VGIDCUA3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027315258.34_warc_CC-MAIN-20190820070415-20190820092415-00068.warc.gz\"}"}