Survey.jl icon indicating copy to clipboard operation
Survey.jl copied to clipboard

Add `subset()` style function

Open smishr opened this issue 2 years ago • 5 comments

In R, there is a subset function which is a transformation from SurveyDesign->SurveyDesign and ReplicateDesign->ReplicateDesign such that the domain of the survey is restricted to given condition (eg age>18 or sex="Male"). Subpopulation estimates are then calculated with any API function like mean total etc (instead of the full population estimate)

How to implement this? for replicate design R code is given line 667 here, for SurveyDesign given line 314 here

smishr avatar Jan 19 '23 06:01 smishr

It's simple to add for replicate design, it's just a subset from DataFrames.

ayushpatnaikgit avatar Jan 29 '23 05:01 ayushpatnaikgit

I would like to work on this issue

EngPeterAtef avatar Feb 26 '24 13:02 EngPeterAtef

Hi @EngPeterAtef Sorry, I am not sure why I didn't get a notification when you commented. Apologies for the delay.

ayushpatnaikgit avatar Mar 07 '24 12:03 ayushpatnaikgit

@EngPeterAtef

We want to implement this function in Julia: https://r-survey.r-forge.r-project.org/survey/html/subset.survey.design.html

ayushpatnaikgit avatar Mar 07 '24 12:03 ayushpatnaikgit

On it

EngPeterAtef avatar Mar 14 '24 18:03 EngPeterAtef