Learn R Programming

psychmeta (version 2.7.0)

sparsify_simdat_d: Create sparse artifact information in a "simdat_d_database" class object

Description

This function can be used to randomly delete artifact from databases produced by the simulate_d_database function. Deletion of artifacts can be performed in either a study-wise fashion for complete missingness within randomly selected studies or element-wise missingness for completely random deletion of artifacts in the database. Deletion can be applied to reliability estimates and/or u ratios.

Usage

sparsify_simdat_d(
  data_obj,
  prop_missing,
  sparify_arts = c("rel", "u"),
  study_wise = TRUE
)

Value

A sparsified database

Arguments

data_obj

Object created by the "simdat_d_database" function.

prop_missing

Proportion of studies in from which artifact information should be deleted.

sparify_arts

Vector of codes for the artifacts to be sparsified: "rel" for reliabilities, "u" for u ratios, or c("rel", "u") for both.

study_wise

Logical scalar argument determining whether artifact deletion should occur for all variables in a study (TRUE) or randomly across variables within studies (FALSE).