Learn R Programming

normref (version 0.0.0.1)

different_rel: Estimate reliability across multiple window widths and age steps

Description

Estimates reliability curves across various combinations of window widths and age step sizes, with optional per-individual estimation.

Usage

different_rel(
  data,
  item_variables,
  age_name,
  step_window,
  min_agegroup = NULL,
  max_agegroup = NULL,
  step_agegroup,
  include_window_per_person = FALSE,
  complete.obs = TRUE
)

Value

An object of class Drel (a data.frame) with:

  • rel: Reliability estimates

  • age: Corresponding evaluated ages

  • window_width: Width of the window used

  • age_group_width: Step size between evaluated age groups

  • version: Type of estimation ("step" or "window_per_person")

Arguments

data

data.frame containing item scores and age variable.

item_variables

character vector. Names of the columns with item scores.

age_name

string. Name of the age variable. Default is "age_years".

step_window

numeric vector. Window widths to evaluate.

min_agegroup

numeric. Minimum age to include. Defaults to the floor of the minimum age in the data.

max_agegroup

numeric. Maximum age to include. Defaults to the ceiling of the maximum age in the data.

step_agegroup

numeric vector. Step sizes between evaluated age points.

include_window_per_person

logical. If TRUE, also estimates reliability for each individual. Default is FALSE.

complete.obs

logical. If TRUE (default), uses listwise deletion; if FALSE, uses pairwise deletion.

See Also

plot_drel()

Examples

Run this code
# \donttest{
invisible(data("ids_kn_data"))
rel_int <- different_rel(
  data = ids_kn_data,
  item_variables = colnames(ids_kn_data),
  age_name = "age_years",
  step_window = c(0.5, 1, 2, 5, 10, 20),
  min_agegroup = 5,
  max_agegroup = 20,
  step_agegroup = c(0.5, 1, 1.5, 2)
)
# }

Run the code above in your browser using DataLab