margins icon indicating copy to clipboard operation
margins copied to clipboard

T score as opposed to z score for survey data

Open mollypak opened this issue 5 years ago • 1 comments

Hi, I see someone requested this before, and you said it doesn't seem worth it, but in order to get the correct p value and standard errors for complex survey designs (and to do what both STATA and I believe SUDAAN uses when calculating predictive margins), using the t score instead of the z score is important. I would like to ask you to possibly reconsider adding this option?

I know some parts of the survey package will do a df=Inf as a default and always use the t distribution, so that the results are the same as a z score, but can be altered, or df= degf(design). I am not sure how you wrote your code, but if a t score was always the default for results from svyglm, that would be very nice.

mollypak avatar Apr 11 '20 17:04 mollypak

I didn't implement this mainly because I didn't (and still don't) have time to do it and write the tests needed to make sure it's all correct. If you're keen, please send a PR.

leeper avatar Jun 20 '20 11:06 leeper