birtm_aio: All-in-one bayesian item response theory modeler

Description Usage Arguments Value Examples

View source: R/birtm_aio.R

Description

A wrapper function to fit a bayesian IRT model with one command.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
birtm_aio(
  response_data,
  response_columns,
  person_data = NULL,
  item_data = NULL,
  situation_data = NULL,
  variable_specifications = NULL,
  model_specifications = NULL,
  prior = NULL,
  cores = 4,
  file = NULL,
  check_prior_influence = FALSE,
  preparing_bf = FALSE,
  add_waic = FALSE,
  add_loo = FALSE,
  refit = FALSE,
  ...
)

Arguments

response_data

A tibble or dataframe with person identifiers and responsdata (and possibly person covariables).

response_columns

A character or symbol vector with all columns that represent item responses or a range of columns specified corresponding to dplyr::select() rules (e. g.: item01:item25).

person_data

A tibble or dataframe with person identifiers linked to person covariables.

item_data

A tibble or dataframe with item identifiers linked to item covariables.

situation_data

A tibble or dataframe with person and item identifiers linked to situation covariables.

variable_specifications

Named list of characters or strings.

model_specifications

Named list of strings and numerics.

prior

Bayesian priors in format of brms::prior

cores

Number of CPU cores used to fit the model

file

Path and name the fit object is saved for later reusage (will be loaded automatically if already exists)

check_prior_influence

Boolean

preparing_bf

Booleans

add_waic

Boolean

add_loo

Boolean

refit

Boolean

...

Arguments passed to brms::brm

Value

birtsmsfit object

Examples

1
2
3
4
5
6
7
## Not run: 
testdata <- data_spm[1:100,] # take only 1/5th of the data to speed up the examplary model fitting
fit_1d_1pl_spm2 <- birtms::birtm_aio(response_data = testdata, response_columns = i1:i12,
file = '../inst/extdata/fit_1d_1pl_spm2')
fit_1d_1pl_spm2

## End(Not run)

Famondir/birtms documentation built on Feb. 18, 2022, 2:51 a.m.