item.scale: Functions to form a scale from a set of survey items

View source: R/scales.R

item.scaleR Documentation

Functions to form a scale from a set of survey items

Description

Combines multiple items, specified using a formula interface, into a single "scale"

Usage

item.scale(
  formula,
  data = NULL,
  subset = NULL,
  na.action = na.pass,
  drop.unused.levels = F,
  scale.fun = mean,
  standard = FALSE,
  numeric = FALSE,
  ...
)

Arguments

formula

A formula specifying the items to combine into a scale Should be of the form ~ item1 + item2 + item3

data

The data frame to use to get the data from

subset

Specifies if only a specific subset of the data should be used

na.action

What should be done with NAs?

scale.fun

which function to compose the scale. examples include sum, mean

standard

should the individual items be standardized before inclusion in the scale?

numeric

should the individual items be cast into numeric before inclusion in the scale?

...

currently unused

drop.unused.level

If factors are being combined, should we only include levels that are actually used?

Value

An object of type item.scale. This is fundamentally a vector, and can be used as such. It has a number of additional attributes (such as cronbach) that are useful in future calculations and functions


rwash/surveys documentation built on Sept. 18, 2023, 11:31 p.m.