ReportTable: Summarize Item Analysis into Table

Description Usage Arguments Details Value Author(s) Examples

View source: R/Scale.R

Description

This function takes the output of ItemAnalysis() and produces a useful table with item statistics. It also writes the table in the working directory, if asked to.

Usage

1
ReportTable(it, write_file=FALSE, sep=";")

Arguments

it

Output from ItemAnalysis

write_file

logical. Should a text file be written?

sep

Separator to use in the text output file.

Details

If asked to write a file, it will do so in the working directory.

Value

A data frame with item statistics, specifically:

Item

Number or Name of the Item.

Corr. with Scale

Correlation of the item with the sum of the rest of the items.

Factor Loading

Loading of the Item to a Single Factor

Mean

Item Mean

SD

Item SD

Author(s)

Nikolaos Giallousis, psierevn@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)

depressionRel <- ItemAnalysis(depressionPre)

ReportTable(depressionRel)

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...
    Item Corr. to scale Factor Loading     Mean        SD
q12  q12      0.6102391      0.6601397 2.244898 1.1492824
q11  q11      0.4884530      0.5480238 1.357143 0.7071068
q5    q5      0.4672954      0.5315525 1.877551 1.0960595
q9    q9      0.4636682      0.5275133 2.540816 1.0665328
q20  q20      0.4409165      0.5122538 2.193878 0.8811680
q2    q2      0.4334911      0.5017576 1.402062 0.8619236
q14  q14      0.4081698      0.4881722 2.357143 0.8995990
q10  q10      0.4298022      0.4777119 2.500000 1.3179960
q7    q7      0.4258818      0.4753230 2.908163 1.0943787
q16  q16      0.4099898      0.4707564 2.765306 1.2746620
q18  q18      0.4055010      0.4671820 2.632653 1.1611206
q17  q17      0.4079807      0.4628255 2.816327 1.2546568
q19  q19      0.3827926      0.4471462 2.826531 1.2764764
q13  q13      0.3828851      0.4406977 2.329897 1.0177759
q8    q8      0.3726962      0.4330825 1.357143 0.8403485
q4    q4      0.3600025      0.4277177 2.581633 1.1746767
q6    q6      0.3830278      0.4217370 3.000000 1.2435400
q15  q15      0.3146081      0.3602039 2.928571 1.2205289
q3    q3      0.2439006      0.3072653 2.285714 1.3393336
q1    q1      0.1966437      0.2512631 2.806122 1.2735061

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

Related to ReportTable in Scale...