reshape.rasch: Reshape data frame in wide format into a long format

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/reshape.rasch.R

Description

This function reshapes a matrix from 'wide' into a 'long' format. This is necessary for the three-way analysis of variance with mixed classification for testing the Rasch model.

Usage

1

Arguments

data

Matrix or data frame in 'wide' format.

group

Vector which assigns each person to a certain subgroup (external split criterion). Note, that this function is restricted to A = 2 subgroups.

Details

In order to apply the three-way analysis of variance with mixed classification for testing the Rasch model, data need to be in 'long' format. That is, Rasch model data design is interpreted as a analysis of variance design (A > B) x C, where items are levels of a fixed factor C and the testees are levels of a random factor B, nested within a fixed factor A of different subgroups.

Value

Returns a data frame with following entries:

group fixed factor A (subgroup)
person random factor B (testees)
item fixed factor C (items)
response dependent variable, 0 (item not solved) and 1 (item solved)

Author(s)

Takuya Yanagida [email protected], Jan Steinfeld [email protected]

References

Kubinger, K. D., Rasch, D., & Yanagida, T. (2009). On designing data-sampling for Rasch model calibrating an achievement test. Psychology Science Quarterly, 51, 370-384.

Kubinger, K. D., Rasch, D., & Yanagida, T. (2011). A new approach for testing the Rasch model. Educational Research and Evaluation, 17, 321-333.

See Also

aov.rasch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

# simulate Rasch model based data
# 100 persons, 20 items,
dat <- simul.rasch(100, items = seq(-3, 3, length.out = 20))
# reshape simulated data into 'long' format with balanced assignment
# of testees into two subgroups.
dat.long <- reshape.rasch(dat, group = rep(0:1, each = nrow(dat) / 2))
head(dat.long)

# extract variable names of items
vnames <- grep("it", names(aid_st2), value = TRUE)
# reshape aid subtest 2 data into 'long' format with split criterium sex
aid_long.sex <- reshape.rasch(aid_st2[, vnames], group = aid_st2[, "sex"])

## End(Not run)

pwrRasch documentation built on May 29, 2017, 2:11 p.m.