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 cluster or ecluster. See pdf from Mplus website.