| wideFormat {MBESS} | R Documentation |
Transform nested data from long format into wide format to run multilevel model in structural equation modeling framework (Bauer, 2003).
wideFormat(data, betweencol, withincol, idcol)
data |
A long-format dataset |
betweencol |
The columns of the between-level variables |
withincol |
The columns of the within-level variables |
idcol |
The variable specifying cluster ID |
A dataset in wide format
Sunthud Pornprasertmanit (University of Kansas; psunthud@ku.edu)
Bauer, D. J. (2003). Estimating multilevel linear models as structural equation models. Journal of Educational and Behavioral Statistics, 28, 135-167.
## Not run: dat <- createDataCRD(100, 50, 4, iccy=0.25, es=0.5) datwide <- wideFormat(dat, 3, 2, 1) ## End(Not run)