Scaling weights in runmlwin

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
SoumavaBasu
Posts: 7
Joined: Tue Jan 09, 2018 7:23 pm

Scaling weights in runmlwin

Post 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
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: Scaling weights in runmlwin

Post 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.
SoumavaBasu
Posts: 7
Joined: Tue Jan 09, 2018 7:23 pm

Re: Scaling weights in runmlwin

Post 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
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: Scaling weights in runmlwin

Post 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
Post Reply