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

View source: R/reshape.rasch.R

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.

1 |

`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. |

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.

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) |

Takuya Yanagida takuya.yanagida@univie.ac.at, Jan Steinfeld jan.steinfeld@univie.ac.at

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.

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.