xKDR / Survey.jl

Analysis of complex surveys
https://xkdr.github.io/Survey.jl/
GNU General Public License v3.0
53 stars 19 forks source link

WIP: Hartley Rao and other improvements #247

Open smishr opened 1 year ago

smishr commented 1 year ago

I couldnt get R to match Hartley Rao results like for like. R isnt using Hartley Rao algorithm everywhere, only for certain PPS cases. svyrecvar isnt the same as HR.

ayushpatnaikgit commented 1 year ago

We need to do something about tests. If we can't match answers with R, or any other language, it won't be good to merge this.

codecov-commenter commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (v0.1.1@4fac910). Click here to learn what that means. The diff coverage is n/a.

@@            Coverage Diff            @@
##             v0.1.1     #247   +/-   ##
=========================================
  Coverage          ?   92.66%           
=========================================
  Files             ?       14           
  Lines             ?      218           
  Branches          ?        0           
=========================================
  Hits              ?      202           
  Misses            ?       16           
  Partials          ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

smishr commented 1 year ago

We need to do something about tests. If we can't match answers with R, or any other language, it won't be good to merge this.

svyrecvar is a beast, but Im confident that a Julia native solution will be much faster, with less overheads.

Also Hartley Rao is good starting point. Better than returning a variance at all

smishr commented 1 year ago

@ayushpatnaikgit Should we

  1. Integrate Hartley Rao variance with SurveyDesign. So that the four summary statistics return some variance (instead of nothing)
  2. add tests here

Discussing and adding the Taylor series / recvar might take several months, as well as #277 and other big structural changes will take several months. Until then SurveyDesign will return HR by default? After that we can change default