gen_data: Generate item response data sets

Description Usage Arguments Details Value Author(s)

Description

Generate a data set using the simple latent class model (gen_lc), the latent class with random effects model (gen_lcre), or the finite mixture model (gen_fm) as the underlying data generating mechanism.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
gen_lc(
  n = 250,
  tau = 0.08,
  miss.prop = 0.2,
  seed = NULL,
  name.items = TRUE,
  drop.gs = FALSE
)

gen_lcre(
  n = 250,
  tau = 0.08,
  miss.prop = 0.2,
  seed = NULL,
  sigma = c(1.5, 1.5),
  name.items = TRUE,
  drop.gs = FALSE
)

gen_fm(
  n = 250,
  tau = 0.08,
  miss.prop = 0.2,
  seed = NULL,
  eta = c(0.5, 0.2),
  name.items = TRUE,
  drop.gs = FALSE
)

Arguments

n

Sample size.

tau

Prevalence of the disease, i.e. P(δ=1).

miss.prop

Proportion of missing values in the gold standard item.

seed

Random seed.

name.items

(Logical) Use item names as set in the options?

drop.gs

(Logical) Drop the gold standard item?

sigma

The standard deviation of the random effects.

eta

(Vector of length 2) Probabilities of correctly classifying diseased and healthy individuals respectively.

Details

The parameters are set in the package options.

Value

Returns a data frame.

Author(s)

Haziq Jamil, Elena Erosheva


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