ietoolkit icon indicating copy to clipboard operation
ietoolkit copied to clipboard

iebaltab: add svy option

Open luizaandrade opened this issue 6 years ago • 7 comments

A friend asked me if it was possible to use this command with iebaltab. I think the hardest part would be checking all possible errors, but I haven't used it very much. Any thoughts? @kbjarkefur @bbdaniels

luizaandrade avatar Mar 26 '18 21:03 luizaandrade

What are they trying to accomplish with that? The command already accepts weights, clusters and strata FE.

bbdaniels avatar Mar 26 '18 22:03 bbdaniels

It would be nice to have it work with syv so that people that is already using it does not have to define weights etc. again. I haven't used syv much, but if iebaltab can already do the important things (like @bbdaniels' point) it might not be worth going through the effort of implementing with error handling and all (like @luizaandrade's point). So I think it comes down to these two points if we want to implement it or not:

  1. We want to be very customer service friendly and implement it anyway
  2. There is something else that syv does we have not thought of that would be nice to add to iebaltab, and if so we can either implement it directly, or make syv work with it.

As a first step, @luizaandrade , do you want to ask your friend what functionality of syv she/he is using, and then we see if that is already included in iebaltab? If it is not we should maybe have another discussion.

kbjarkefur avatar Mar 27 '18 12:03 kbjarkefur

iebaltab is in need of a major re-write anyways. Since most (maybe even all?) of the functionality of syv already exists as options to iebaltab, we do not think it is worthwhile to add syv compatibility until we do the major re-write.

No one in the ietoolkit team has developed syv compatible commands before, so it would require a lot of extra learning and testing for us to implement it, that's why we will hold off to implement this.

kbjarkefur avatar Apr 26 '18 13:04 kbjarkefur

Hey! I am using the iebaltab command to work on a panel survey data. I understood how to add weights in the command but still lack a clarity on how to add strata in the command. Any help would be appreciated!

kapoormanisha avatar Jul 12 '23 03:07 kapoormanisha

hello @kapoormanisha. thank you for your feedback.

As you can see above we have previously discussed including this option. But we have not encountered an example where controlling for strata can be done in existing options. For example including them as fixed effects. But I am no econometrician so I can definitely be missing something obvious.

It would require a lot of work to make our commands compatible with all the features of svyset. Therefore, we would need a good justification to do so. We would appreciate your insights of this if you want to share them.

kbjarkefur avatar Jul 12 '23 08:07 kbjarkefur

But we have not encountered an example where controlling for strata can be done in existing options. For example including them as fixed effects. But I am no econometrician so I can definitely be missing something obvious.

I think @kbjarkefur meant that we have not encountered an example where this cannot be done with the current set up. Does fixedeffect(strata) not work for your case, @kapoormanisha?

luizaandrade avatar Jul 13 '23 00:07 luizaandrade

Hi. Thank you so much for getting back to me @luizaandrade and @kbjarkefur. I was actually unable to figure out how to add strata in the command but I had missed that it can be included as fixed effects. So now I have worked it out.

It looks like this:

preserve
iebaltab gender married  [pw=wgt], fixedeffect(strata) grpvar(treatment) vce(cluster psu) normdiff savetex(normdiffcheck2) 
restore

where psu is my primary sampling unit and strata is the stratification variable. Thank you for the help!

kapoormanisha avatar Jul 13 '23 21:07 kapoormanisha