Learn R Programming

prefmod (version 0.8-32)

xmpl: Data (Likert items): Example Data Set

Description

Data to illustrate the usage of patt.design for rating scale (Likert type) items.

Usage

xmpl

Arguments

encoding

UTF-8

Details

Datasets in data files or Data frames used in patt.design require the follwing structure:
  • All values must be numeric.
  • The item responses must be in the leftmost columns (such asI1toI3above).
  • Categorical subject covariates follow the item responses (rightmost columns) and their levels must be specified as consecutive integers. If in a used datafile or dataframe these are defined asRfactors they will be converted to integers. This is not possible if characters are used as factor levels and, consequently,patt.designwill produce an error.

Examples

Run this code
des <- patt.design(xmpl, nitems = 3, resptype = "rating", cov.sel = "SEX")
head(des)

Run the code above in your browser using DataLab