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

View source: R/rasch_mds_children.R

rasch_mds_childrenR Documentation

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

Description

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

Usage

rasch_mds_children(
  df,
  vars_id,
  vars_group,
  vars_metric_common,
  vars_metric_grouped = NULL,
  TAM_model = "PCM2",
  vars_DIF = NULL,
  resp_opts = 1:5,
  has_at_least_one = 4: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_id

a string with column name uniquely identifying individuals

vars_group

a string with the column name identifying grouping variable

vars_metric_common

a character vector the common items among all individuals

vars_metric_grouped

a named list of character vectors with the items to use in the Rasch Analysis per group. The list should have names corresponding to the different groups, and contain character vectors of the corresponding items for each group.

TAM_model

a string with the type of IRT model to use, passed to irtmodel argument of TAM::tam(). Default is "PCM2"

vars_DIF

Currently does nothing. In the future, 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

has_at_least_one

a numeric vector with the response options that a respondent must have at least one of in order to be included in the metric calculation. See details for more information.

max_NA

a numeric value for the maximum number of NAs allowed per individual among vars_metric_common and the relevant items from vars_metric_grouped. 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.

Often Rasch Analysis of children data is more difficult because of the extreme skewness of the responses. For this reason, it is often advisable to build a scale only with the respondents on the more severe end of the disability continuum. By specifying has_at_least_one, the function will remove all children from the sample who do endorse an answer of any of has_at_least_one in at least one vars_metric. The scores created can be reunited with the excluded children post-hoc.

Value

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

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(), 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()

Other children analysis functions: rasch_df_nest(), rasch_drop(), rasch_model_children(), rasch_quality_children_print(), rasch_quality_children(), rasch_recode(), rasch_rescale_children(), rasch_split_age(), rasch_split(), rasch_testlet()


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