wscale | R Documentation |
Uses the cluster
and ecluster
(cluster size and effective cluster size) options specified in Mplus. See note from the Mplus website.
If there is no variation in weights within a cluster, the weights will scale to 1.
wscale(cluster, data, wt, type = "cluster")
cluster |
The cluster variable. |
data |
The original dataset. |
wt |
The weight variable to scale. |
type |
Either |
data(pisa2012, package = 'MLMusingR')
pisa2012$clustwt <- wscale('schoolid', pisa2012, 'w_fschwt')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.