difplot: A Wrapper for DIF vizualizing functions

Description Usage Arguments Value Examples

View source: R/difplot.R

Description

This function automates visualizing uniform or nonuniform DIF across a contiuous covariate

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
difplot(
  df,
  covname,
  covmin,
  covmax,
  covtitle,
  lvtitle,
  type = NULL,
  sig.uni = NULL,
  sig.nonuni = NULL
)

Arguments

df

input data frame consisting of factor indicators and DIF covariate

covname

input character vector name for DIF covariate in df

covmin

input numeric for minimum value of covariate to begin estimating unidimensional factor models

covmax

input numeric for maximum value of covariate to begin estimating unidimensional factor models

covtitle

character input of name for covariate (both on x-axis title, and in file name)

lvtitle

character input for name of lv (for file naming)

type

whether user wants to extract loading ("loads") or interpts "ints"

sig.uni

an optional character vector of item #s that show significant uniform DIF

sig.nonuni

an optional character vector of item #s that show significant non-uniform DIF

Value

a ggplot of DIF (also ggsave'd to ./output)

Examples

1
load.plot <- difplot(df, covname, covmin = 3, covmax = 8, covtitle = "Perceived Social Class", lvtitle = "Satisfaction", type = "loads", sig.nonuni = sig.nonuni)

jsakaluk/psyscores documentation built on Dec. 16, 2021, 6:50 p.m.