get_percentile: Get percentile for ONE ACE metric

View source: R/module-composites.R

get_percentileR Documentation

Get percentile for ONE ACE metric

Description

Function to calculate percentile ranks for summarized data from ONE ACE metric.

Usage

get_percentile(
  df,
  module,
  id_var = "pid",
  var,
  reverse = FALSE,
  norm_dist = "self",
  norm_dist_grade = NULL
)

Arguments

module

user-specified string to be appended in the output colname

id_var

name of subject identifier col in df Note that this function does NOT allow a grouping variable; please only feed data from ONE GROUP AT A TIME into this function. It's better for norming assumptions.

var

name of data col in df. specified as a string

reverse

should percentile scores be calculated in reverse order (smaller number = better rank)? Defaults to FALSE.

norm_dist

which data should the percentiles be normed to? one of the following "self": no norming distribution, percentiles based on data being fed in "ace_t1": based on results from ACE Fall 2016 data "ace_t3": based on results from ACE Fall 2017 data

norm_dist_grade

if specifying an ACE norming distribution, which grade's norms? Grades in T1: "third", "fifth", "seventh". Grades in T3: "fourth", "sixth", "eighth". Specify as ONE OF THESE STRINGS! Will throw error if grade not specified properly

Value

df containing id_var, group_var (if applicable), var, and percentile rank


josegallegos07/aceR documentation built on June 27, 2022, 10:25 a.m.