Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mscale

Extract/Replace Measurement Scale


Description

Generic functions for extracting and replacing the measurement scale from an object.

Usage

mscale(object, ...)
  mscale(object) <- value

Arguments

object

an object.

...

arguments passed to methods.

value

an object describing the measurement scale.

Examples

## methods for "paircomp" data
pc <- paircomp(rbind(
  c(2,  1,  0),
  c(1,  1, -1),
  c(1, -2, -1),
  c(0,  0,  0)))
pc

## extract
mscale(pc)

## replace (collapse to >/=/< scale)
mscale(pc) <- sign(mscale(pc))
pc


## similar for "itemresp" data
ir <- itemresp(cbind(
  c(-1, 0, 1, 1, 0),
  c(0, 1, 2, 1, 2),
  c(1, 2, 1, 1, 3)))
ir

## extract
mscale(ir)

## replace (single scale for all items)
mscale(ir) <- 1:3
ir

psychotools

Psychometric Modeling Infrastructure

v0.6-0
GPL-2 | GPL-3
Authors
Achim Zeileis [aut, cre] (<https://orcid.org/0000-0003-0918-3766>), Carolin Strobl [aut], Florian Wickelmaier [aut], Basil Komboz [aut], Julia Kopf [aut], Lennart Schneider [aut] (<https://orcid.org/0000-0003-4152-5308>), Rudolf Debelak [aut]
Initial release
2020-11-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.