jackknife replicate weight 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
tjsduq64
Posts: 31
Joined: Mon Jul 15, 2019 10:04 pm

jackknife replicate weight in runmlwin

Post by tjsduq64 »

Hello,

Is it possible to use runmlwin on Stata to incorporate jackknife replicate weights for variance estimation in complex survey data?

In the dataset, there is a weight variable which I can include it in the model by using weightvar(). I also have replicate weights for variance estimation but I do not know how to utilize this in runmlwin. Below an example of what needs to be done for Stata codes is shown. Let me know if someone knows how to do this using runmlwin.

Also if you know a resource for using weights in runmlwin in general, let me know. Thank you.
-----------------------------------------------------------------------------------------------------
/*assign jackknife multipliers that vary by stratum*/
local strata ""
local mult ""
forvalues i = 1/25 {
if 'i' != 9 {
local strata "'strata' 'i 'i' 'i'"
local mult "'mult' 0.666667 0.666667 0.666667"
}
if 'i' == 9 {
local strata "'strata' 'i 'i' 'i'"
local mult "'mult' 0.750000 0.750000 0.750000"
}

di "'strata'"
di "'mult'"

/*describe variance estimation method and jackknife replicate weights*/
svyset [pweight=chspr2003wtca], vce(jackknife) mse //
jkrweight(chspr2003repwtca*, multiplier('mult') stratum('strata'))

svy jackknife: tabulate childresultgroup childcohort
-----------------------------------------------------------------------------------------------------

- Sun Lee
Last edited by tjsduq64 on Tue Jul 16, 2019 3:35 pm, edited 1 time in total.
tjsduq64
Posts: 31
Joined: Mon Jul 15, 2019 10:04 pm

Re: jackknife replicate weight in runmlwin

Post by tjsduq64 »

alternatively, would the sandwich estimator in the runmlwin work fine for correcting standard errors, instead of using jackknife replicate weights? If this is the case, I will just go with the sandwich estimator...although they seem to be developed for different purposes.

- Sun Lee
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: jackknife replicate weight in runmlwin

Post by GeorgeLeckie »

Hi Sun Lee,

Yes you can specify weights in runmlwin. You need to specify weights at each level in the model.

See the help file and search for "weight" to find the weights options.

Unfortunately we do not have an example to show you.

There is an example in the Stata ME manual for their -mixed- command, so you could try replicating that using runmlwin as a way into using weights. See pages 42-46.

https://www.stata.com/manuals/memixed.pdf

Best wishes

George
tjsduq64
Posts: 31
Joined: Mon Jul 15, 2019 10:04 pm

Re: jackknife replicate weight in runmlwin

Post by tjsduq64 »

GeorgeLeckie wrote: Tue Jul 23, 2019 9:33 am Hi Sun Lee,

Yes you can specify weights in runmlwin. You need to specify weights at each level in the model.

See the help file and search for "weight" to find the weights options.

Unfortunately we do not have an example to show you.

There is an example in the Stata ME manual for their -mixed- command, so you could try replicating that using runmlwin as a way into using weights. See pages 42-46.

https://www.stata.com/manuals/memixed.pdf

Best wishes

George
Hello George,

Thank you for the reply.

I may not have explained well; I figured out the way to incorporate weights at each level. What I haven't been able to do is incorporating jackknife replicate weights... I think the MLwiN way to handle multilevel clustering already adjust for this, but I am not sure. Do you know if MLwiN already adjust for variance estimation in complex survey design, which is often achieved by methods like jackknife replicates or Taylor linearization?

Sun
Post Reply