wscale {MLMusingR} | R Documentation |
Scale of Sampling Weights
Description
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.
Usage
wscale(cluster, data, wt, type = "cluster")
Arguments
cluster |
The cluster variable. |
data |
The original dataset. |
wt |
The weight variable to scale. |
type |
Either |
Examples
data(pisa2012, package = 'MLMusingR')
pisa2012$clustwt <- wscale('schoolid', pisa2012, 'w_fschwt')
[Package MLMusingR version 0.4.0 Index]