Dear Statalist users,
I was struggling with the implementation of sampling weights (pweight) for individuals using the melogit command, with first-level observations weighted and nested in countries. It gave both convergence problems and unrealistically small standard errors, suggesting that the sample size of the first-level observations is artificially inflated. Although this is not an issue when using the same weight in the regular logit command.
A brief scan through Google and Statalist learnt that I am not the only one encountering this issue. Nevertheless, it appears that the mixed command for multilevel linear regression provides the pwscale option to scale first-level weighted observations so that they sum to the sample size of their corresponding second-level cluster (more information here: https://www.stata.com/features/overv...h-survey-data/). As there does not seem to exist a similar option for melogit, this inspired me to manually re-scale the weights by following procedure:
Given that only relative sizes may matter in sampling weights. Using the scaled weight seems to solve convergence problems and results in seemingly reasonable standard errors.
Any thoughts on the validity of this approach? I remain a bit reluctant since there might be a reason that there is not a standard pwscale option in melogit...
I was struggling with the implementation of sampling weights (pweight) for individuals using the melogit command, with first-level observations weighted and nested in countries. It gave both convergence problems and unrealistically small standard errors, suggesting that the sample size of the first-level observations is artificially inflated. Although this is not an issue when using the same weight in the regular logit command.
Code:
melogit outcome [pweight=weight] || country:
Code:
bysort country: gen n_country = _N egen totalcntry_weight = total(weight), by(country) gen scaled_weight = weight*(n_country/totalcntry_weight)
Any thoughts on the validity of this approach? I remain a bit reluctant since there might be a reason that there is not a standard pwscale option in melogit...