PreProc: PreProc Prepare Scale Data for Analysis

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Scale.R

Description

Organizes data according to the information given in the ScaleData object. It reorders the items given in alternate orderings to participants, reverses items that need to be reversed, assigns the desired labesl to items and returns a structured object appropriate for the ItemAnalysis() function.

Usage

1
PreProc(sc)

Arguments

sc

ScaleData object, produced by the Scale function.

Value

data

A reversed and reordered - as needed - data.frame.

items

If an items vector is provided (see ScaleData), a character vector with the item statements.

Author(s)

Nikolaos Giallousis, psierevn@gmail.com

See Also

ScaleData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(Depression98)
depressionScale <- Scale(data=Depression98, 
                         orders=list(
                           c(16,19,11,9,1,17,5,18,4,8,2,12,
                             20,10,14,6,3,13,15,7),
                           c(1,18,4,15,7,8,3,14,20,6,19,16,
                             12,5,10,13,2,17,11,9)),
                         orders_id=c(
                           rep(1, 49),
                           rep(2, 49)),
                         reverse=c(3,4,13,14,18,20),
                         col_names= paste('q', 1:20, sep=''))
depressionPre <- PreProc(depressionScale)

Example output

Loading required package: psych
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'ggplot2'

The following objects are masked from 'package:psych':

    %+%, alpha


Attaching package: 'Hmisc'

The following object is masked from 'package:psych':

    describe

The following objects are masked from 'package:base':

    format.pval, units

Loading required package: MASS
Warning message:
In PreProc(depressionScale) :
  Items' vector unspecified. out$items is NULL...

Scale documentation built on May 2, 2019, 1:27 p.m.

Related to PreProc in Scale...