item.stat: Item Statistics

Description Usage Arguments Value Author(s) See Also Examples

View source: R/fsia.r

Description

This function computes some statistics for each item.

Usage

1
item.stat(obj, columns, weights = FALSE)

Arguments

obj

An object containing the data imported by function read.formscanner, the key added by function addkey and/or weights added by function addweights.

columns

A vector containing which columns to use. Columns can be specified by name or number.

weights

Logical. If TRUE weights are used to compute the score.

Value

A data frame with the following variables.

item

item label.

score

total score for each item. If weights is FALSE score is equal to the number of corrected responses.

max

maximum score for each item.

perc

ratio between score and max.

Author(s)

Michela Battauz

See Also

person.stat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(test)
data(key)
data(weights)
data(weights_multiple)

testk <- addkey(test, keydata = key)
testw <- addweights(testk, weightsdata = weights)
testwm <- addweights(test, weightsdata = weights_multiple)

# number of correct responses for each item
ist <- item.stat(obj = testk, col = 2:41)
head(ist)
# sum of weights of correct responses for each item
ist <- item.stat(obj = testw, col = 2:41, weights = TRUE)
head(ist)
# sum of weights of every response for each item
ist <- item.stat(obj = testwm, col = 2:41, weights = TRUE)
head(ist)

fsia documentation built on May 29, 2017, 10:52 p.m.

Search within the fsia package
Search all R packages, documentation and source code