mix.data: Randomly mix grouped data

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

Description

This function is called by graph.ran.mean (and potentially other functions) to randomly mix data and create new pseudo group ID variables. Pseudo group IDs match real group IDs in terms of size.

Usage

1
mix.data(x,grpid)

Arguments

x

A matrix or vector containing data to be randomly sorted.

grpid

A vector containing a group identifier.

Value

newid

A pseudo group ID.

grpid

The real group ID.

x

The values in x arranged as belonging to newid.

Author(s)

Paul Bliese paul.bliese@moore.sc.edu

References

Bliese, P. D., & Halverson, R. R. (2002). Using random group resampling in multilevel research. Leadership Quarterly, 13, 53-68.

See Also

graph.ran.mean

Examples

1
2
3
data(bh1996)
mix.data(x=bh1996[c(1:10,200:210,300:310),2:3],
         grpid=bh1996$GRP[c(1:10,200:210,300:310)])


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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.