sparsify_simdat_r: Create sparse artifact information in a "simdat_r_database"...

View source: R/simulate_r.R

sparsify_simdat_rR Documentation

Create sparse artifact information in a "simdat_r_database" class object

Description

This function can be used to randomly delete artifact from databases produced by the simulate_r_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_r(
  data_obj,
  prop_missing,
  sparify_arts = c("rel", "u"),
  study_wise = TRUE
)

Arguments

data_obj

Object created by the "simdat_r_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).

Value

A sparsified database


psychmeta documentation built on June 22, 2024, 6:52 p.m.