samplics icon indicating copy to clipboard operation
samplics copied to clipboard

Reference formulas for four main types of comparisons, in particular "comparison of two groups from the same sample"?

Open msulwa opened this issue 1 year ago • 0 comments

Hi @MamadouSDiallo

I hope this finds you well.

Please may you share the technical formulas for the t-tests implemented by Samplics? I have reviewed the available supporting docs [i, ii, iii] and several stats textbooks, but unfortunately came up short; and I was hoping you could point me towards the textbook with the relevant formulas for the following:

    • [x] Comparison of one-sample mean to a known mean
    • [ ] Comparison of two groups from the same sample (I'm looking looking for this one)
    • [x] Comparison of two means from two different samples
    • [x] Comparison of two paired means

For context, I would like to compare two groups drawn from the same household survey dataset (unpaired), while leveraging the complex survey design (i.e. weights, strata, etc.). I initially thought of using (3) but ran into issues with psus that have 1 observation (and potentially zero observations when splitting into groups). I was not able to overcome the issues despite following the guidance in #33 . I don't experience any zero-division issues when using (2), but I would like to validate my understanding to ensure I can use (2) in place of (3) for my particular use-case.

Sub-sample of psus with 0 or 1 observation

image

One-sample, two-groups implementation

image

Two-samples, unpaired implementation

image

Any guidance would be greatly appreciated.

Best regards, Baraka

[i] https://samplics-org.github.io/samplics/pages/categorical_ttest.html [ii] https://joss.theoj.org/papers/10.21105/joss.03376 [iii] http://isi-iass.org/home/wp-content/uploads/Survey_Statistician_2022_July_N86.pdf

msulwa avatar Jan 22 '23 14:01 msulwa