proficiency.scale: Create a proficiency scale table

View source: R/proficiency.scale.R

proficiency.scaleR Documentation

Create a proficiency scale table

Description

Create a proficiency scale table

Usage

proficiency.scale(
  mod = NULL,
  dontplot = F,
  font.base.size = 10/.pt,
  nlevels = 4,
  level.width = 1.2,
  level1.base = -2.4,
  level.lims = level1.base + (0:nlevels) * level.width,
  color.palette = "BluGrn",
  level.names = paste("Level", 1:nlevels),
  level.descriptions = paste("Level description", 1:nlevels),
  item.params = NULL,
  item.descriptions = NULL,
  item.names.include = F,
  grid.color = ifelse(color.palette == "Blackwhite", "black", "gray"),
  relative.level.rect.heights = F,
  same.level.rect.heights = F,
  level.rect.heights = level.lims,
  level.rect.width = 1,
  level.rect.fill = ifelse(color.palette == "Blackwhite", "white", hcl.colors(4, palette
    = color.palette)[2]),
  level.rect.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  include.level.interval = F,
  level.interval.family = "serif",
  level.interval.size = font.base.size * 1.1,
  level.interval.fontface = "bold",
  level.interval.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  level.interval.hjust = "right",
  level.interval.nudge_x = level.rect.width - 0.02,
  level.interval.nudge_y = 0.1,
  level.name.family = "serif",
  level.name.size = font.base.size * 1.1,
  level.name.fontface = "bold",
  level.name.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  level.name.hjust = "left",
  level.name.nudge_x = 0.02,
  level.name.nudge_y = 0.1,
  level.name.linelength = 30,
  level.description.family = "serif",
  level.description.size = font.base.size,
  level.description.fontface = "plain",
  level.description.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  level.description.nudge_x = 0.02,
  level.description.nudge_y = 0.2,
  level.description.linelength = 30,
  level.description.hjust = "left",
  items.include.categories = NULL,
  items.rect.width = 2,
  items.rect.fill = ifelse(color.palette == "Blackwhite", "white", hcl.colors(4, palette
    = color.palette)[3]),
  items.rect.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  item.description.seperator = "\n",
  item.description.bullet = "* ",
  items.description.family = "serif",
  items.description.size = font.base.size,
  items.description.fontface = "plain",
  item.description.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  items.description.nudge_x = 0.02,
  items.description.nudge_y = 0.1,
  items.description.linelength = 30,
  items.description.hjust = "left",
  person.parameters = ifelse(is.null(mod), null, mod$person$EAP),
  person.middle = F,
  ngroups = nlevels,
  person.dist.type = c("in.levels", "none"),
  person.probability.0 = ifelse(color.palette == "Blackwhite", "white", hcl.colors(4,
    palette = color.palette)[4]),
  person.probability.100 = ifelse(color.palette == "Blackwhite", "white", hcl.colors(4,
    palette = color.palette)[1]),
  person.width = level.width,
  person1.base = level1.base,
  person.lims = person1.base + (0:ngroups) * person.width,
  person.rect.width = 0.2,
  person.rect.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  person.family = "serif",
  person.size = font.base.size,
  person.fontface = "plain",
  person.color = ifelse(color.palette == "Blackwhite", "black", "white"),
  person.nudge_x = person.rect.width/10,
  person.nudge_y = 0.1,
  person.hjust = "center",
  header.level = "Levels",
  header.item = "Items",
  header.persons = paste("Group", 1:ngroups),
  header.show.percentage.in.group = T,
  header.heigth = 0.2,
  header.rect.color = "white",
  header.rect.fill = ifelse(color.palette == "Blackwhite", "white", "lightgray"),
  header.hjust = "center",
  header.nudge_x = 0,
  header.nudge_y = 0.05,
  header.family = "serif",
  header.size = font.base.size,
  header.fontface = "bold",
  header.color = "black",
  extra.verbose = F
)

Arguments

mod

A tam.mml or eRm object.

dontplot

Boolean. If TRUE, the proficiency table is not plotted.

font.base.size

Size of base text in milimeters. From ggplot-specs: This is unusual, but makes the size of text consistent with the size of lines and points. Typically you specify font size using points (or pt for short), where 1 pt = 0.35mm. ggplot2 provides this conversion factor in the variable .pt, so if you want to draw 12pt text, set size = 12 / .pt.

nlevels

Number of levels in the proficiency table.

level.width

Width levels in logits

level1.base

Lower limit of 1st level in logits

level.lims

A vector of level limits (lower limit, middle levels ..., higher limit) (if you want equal sized levels, use level.width and level1.base)

color.palette

"Blackwhite" or name of hcl-palette to use as colorscheme. Get all available names: hcl.pals(). See five colors from all palettes here: https://developer.r-project.org/Blog/public/2019/04/01/hcl-based-color-palettes-in-grdevices/

level.names

A vector of names of levels

level.descriptions

A vector of level descriptions

item.params

A matrix of item parameters (for automatic item descriptions)

item.descriptions

A matrix of item descriptions (if you don't provide them, they will be produced from item.params or mod)

item.names.include

Boolean: Include item names before the description.

relative.level.rect.heights

Boolean: Set the level heights relative to the texts.

same.level.rect.heights

Boolean: Let the level heights be equal no matter the logit intervals.

level.rect.heights

A vector of heights of the levels. Heights are relative to other heights.

level.rect.width

Width of the level descriptions. Width are relative to other widths.

level.rect.fill

See header

level.rect.color

See header

include.level.interval

Boolean. Include interval of the level (in logits)

level.interval.family

See header

level.interval.size

See header

level.interval.fontface

See header

level.interval.color

See header

level.interval.hjust

See header

level.interval.nudge_x

See header

level.interval.nudge_y

See header

level.name.family

See header

level.name.size

See header

level.name.fontface

See header

level.name.color

See header

level.name.hjust

See header

level.name.nudge_x

See header

level.name.nudge_y

See header

level.name.linelength

Length of description in characters before new line.

level.description.family

See header

level.description.size

See header

level.description.fontface

See header

level.description.color

See header

level.description.nudge_x

See header

level.description.nudge_y

See header

level.description.linelength

Length of description in characters before new line.

level.description.hjust

See header

items.include.categories

An integer indicating how many categories to include. Set to NULL if all categories should be included.

items.rect.width

Width of the item descriptions. Width are relative to other widths.

items.rect.fill

See header

items.rect.color

See header

item.description.seperator

Character(s) to insert between item descriptions (\n is newline)

item.description.bullet

Character(s) to insert before item descriptions

items.description.family

See header

items.description.size

See header

items.description.fontface

See header

item.description.color

See header

items.description.nudge_x

See header

items.description.nudge_y

See header

items.description.linelength

Length of description in characters before new line.

items.description.hjust

See header

person.parameters

Person abillities in logits.

person.middle

Boolean. Use person parameter in the middle of the group interval for calculations of person.probabilities (Default is to use person in the bottom of the group)

ngroups

Number of person groups

person.dist.type

Type of person group. At the moment just: "in.levels" or "none"

person.probability.0

Color of 0 percent probability of correct answer in person groups

person.probability.100

Color of 100 percent probability of correct answer in person groups

person.width

Width person groups in logits

person1.base

Lower limit of 1st person group in logits

person.lims

A vector of person limits (lower limit, middle levels ..., higher limit) (if you want equal sized levels, use person.width and person1.base)

person.rect.width

Width of person groups. Width are relative to other widths.

person.rect.color

See header

person.family

See header

person.size

See header

person.fontface

See header

person.color

See header

person.nudge_x

See header

person.nudge_y

See header

person.hjust

See header

header.level

Levels header text

header.item

Items header text

header.persons

Person group header texts (vector of a text for each group)

header.show.percentage.in.group

Boolean. Show percentage of persons in each group.

header.heigth

Height of the header in "logits" relative to level limits.

header.rect.color

Color of header border

header.rect.fill

Fill of the header

header.hjust

Justification of the header text

header.nudge_x

Nudging of the header text on the x-axis

header.nudge_y

Nudging of the header text on the y-axis

header.family

Font family of the header text

header.size

Size of the header text

header.fontface

Font face (bold, normal, italic) of the header text

header.color

Font color of the header text

extra.verbose

Print warnings in PDF and HTML-output

Value

Returns a ggplot object.

Examples

mod<-digram.estimate(DHP)
proficiency.scale(mod)

jeppebundsgaard/RDigram documentation built on Oct. 29, 2023, 7:15 p.m.