Page 1 of 1

Scaling weights in runmlwin

Posted: Wed Jun 27, 2018 8:41 pm
by SoumavaBasu
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

Re: Scaling weights in runmlwin

Posted: Sun Jul 01, 2018 3:12 pm
by ChrisCharlton
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.

Re: Scaling weights in runmlwin

Posted: Mon Aug 20, 2018 5:32 am
by SoumavaBasu
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

Re: Scaling weights in runmlwin

Posted: Wed Sep 05, 2018 9:58 am
by ChrisCharlton
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