rasch_mds: Top-level function to perform Rasch Analysis on WHO Model...

View source: R/rasch_mds.R

rasch_mdsR Documentation

Top-level function to perform Rasch Analysis on WHO Model Disability Survey data

Description

Top-level function to perform Rasch Analysis on WHO Model Disability Survey data

Usage

rasch_mds(
  df,
  vars_metric,
  vars_id,
  vars_DIF = NULL,
  resp_opts = 1:5,
  max_NA = 2,
  print_results = FALSE,
  path_parent = NULL,
  model_name = NULL,
  testlet_strategy = NULL,
  recode_strategy = NULL,
  drop_vars = NULL,
  split_strategy = NULL,
  comment = NULL
)

Arguments

df

a data frame of individual survey data, where each row is an individual

vars_metric

a character vector of items to use in the Rasch Analysis

vars_id

a string with column name uniquely identifying individuals

vars_DIF

a string with the column names to use for analyzing differential item functioning (DIF). Default is NULL, to skip analysis of DIF.

resp_opts

a numeric vector of possible response options for vars_metric. Must begin with 1. Default is 1:5

max_NA

a numeric value for the maximum number of NAs allowed per individual among vars_metric. Default is 2.

print_results

a logical value indicating whether or not to print various files displaying results from the Rasch Model. Default is FALSE, to not print the files.

path_parent

a string with the path to the folder where results from multiple models will be outputted. Default is NULL

model_name

a string with a name for the model, which is used to create a new folder for model output. Default is NULL.

testlet_strategy

a list giving the strategy to take for creating testlets, passed to rasch_testlet(). One element of the list per testlet to create. Each element of the list must be a character vector of column names to use for the testlet. Optionally, name the element of the list to give the name of the new testlet. Otherwise, the new testlet will be the original column names separated by "_". Default is NULL, to not create testlets.

recode_strategy

a named list giving the strategy to take for recoding variables, passed to rasch_recode(). One element of the list per recode strategy. Each element of the list is a numeric vector giving the new values to map the variables to. The names of the list are the groups of column names to use for each recoding strategy, separated only by ",". Default is NULL, to not recode items.

drop_vars

a character vector of column names to drop from the Rasch Analysis. Default is NULL, to not drop items.

split_strategy

a named list giving the strategy to take for splitting variables by categories, passed to rasch_split(). One element of the list per variable to split by. Each element of the list must be a character vector of column names to split. The names of the list are the variables to split each group of variables by. Default is NULL, to not split items.

comment

a string giving a comment describing the analysis, printed to a txt file. Default is NULL, to not print a comment.

Details

This function combines all of the separate analyses of model fit necessary to assess the quality of the Rasch Model. It is designed to require minimal intervention from the user. Users wishing to have more control over the analysis can use the other Rasch functions in this package separately.

Value

a named list with:

df

a tibble with new columns representing the original person abilities (person_pars) and the rescaled person abilities (rescaled)

vars_metric

a character vector with the variables used in the metric after all adjustments

df_results

a tibble of one row with key results of the model

If print_results is TRUE, prints files to the working directory with the results of the Rasch Model.

See Also

Other rasch functions: rasch_DIF(), rasch_df_nest(), rasch_drop(), rasch_factor(), rasch_mds_children(), rasch_model_children(), rasch_model(), rasch_quality_children_print(), rasch_quality_children(), rasch_rawscore(), rasch_recode(), rasch_rescale_children(), rasch_rescale(), rasch_split_age(), rasch_split(), rasch_testlet()


lindsayevanslee/whomds documentation built on Sept. 9, 2023, 10:54 p.m.