Learn R Programming

OpenRepGrid (version 0.1.14)

statsElements: Descriptive statistics for constructs and elements of a grid.

Description

Descriptive statistics for constructs and elements of a grid.

Descriptive statistics for constructs and elements of a grid.

Usage

statsElements(x, index = TRUE, trim = 20)

statsConstructs(x, index = T, trim = 20)

Value

A dataframe containing the following measures is returned invisibly (see describe):

item name

item number

number of valid cases

mean standard deviation

trimmed mean (with trim defaulting to .1)

median (standard or interpolated)

mad: median absolute deviation (from the median)

minimum

maximum

skew

kurtosis

standard error

Arguments

x

repgrid object.

index

Whether to print the number of the element.

trim

The number of characters an element or a construct is trimmed to (default is 20). If NA no trimming occurs. Trimming simply saves space when displaying correlation of constructs or elements with long names.

Examples

Run this code
if (FALSE) {

   statsConstructs(fbb2003)
   statsConstructs(fbb2003, trim=10)
   statsConstructs(fbb2003, trim=10, index=F)

   statsElements(fbb2003)
   statsElements(fbb2003, trim=10)
   statsElements(fbb2003, trim=10, index=F)

   # save the access the results
   d <- statsElements(fbb2003)
   d
   d["mean"]
   d[2, "mean"]  # mean rating of 2nd element
 
   d <- statsConstructs(fbb2003)
   d
   d["sd"]
   d[1, "sd"]   # sd of ratings on first construct
}

Run the code above in your browser using DataLab