Hi,
I am using MLwiN v3.02 and using the runmlwin command in STATA. The model being run is a two-level model with level 2 weights as 1. I have been scaling the level 1 weights manually before running the command. I just wanted to verify if I am correct in doing so.
Thanks,
Soumava
Scaling weights in runmlwin
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Scaling weights in runmlwin
I checked with Harvey Goldstein, who is responsible for the IGLS algorithm, and his recommendation was to specify the standardised weights option rather than manually scaling them yourself.
-
- Posts: 7
- Joined: Tue Jan 09, 2018 7:23 pm
Re: Scaling weights in runmlwin
Thank you very much Chris, and apologies for the delay in responding. So, I have just used the weightvar option for each level. And I presume that by default this weights are standardized, since there is an extra 'nostandardisation' weight option for the weights. Am I correct?
Thanks,
Soumava
Thanks,
Soumava
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Scaling weights in runmlwin
Yes, if you don't specify a type of weighting then the default is to standardise. You can see this in the following code from runmlwin.ado:
Code: Select all
local hasweights = 0
forvalues l = 1/`maxlevels' {
if "`weight`l''" ~= "" local hasweights = 1
}
if "`weights'" ~= "" {
if `hasweights' == 0 {
display as error "weights options specified but no weights defined"
exit 198
}
local 0, `weights'
syntax , [noStandardisation noFPSandwich noRPSandwich]
if "`standardisation'" == "" local weighttype standardised
else local weighttype raw
}
// Default weight type is standardised
if "`weighttype'" == "" & `hasweights' == 1 local weighttype standardised