Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving from R to Julia #2

Open
ayushpatnaikgit opened this issue Mar 16, 2022 · 1 comment
Open

Moving from R to Julia #2

ayushpatnaikgit opened this issue Mar 16, 2022 · 1 comment

Comments

@ayushpatnaikgit
Copy link

Hi, thank you for making this package.

I am moving my code from R to Julia. I am a user of the survey package in R. The R code takes several hours to run so
I wonder if this Julia package can be used for my problem.

I have household level data of income and I want to compute the statewise total.
Here is how I do it in R:

    srvydsgn <- svydesign(id= ~HOUSEHOLD_ID, strata = ~STATE,
    weight = ~WEIGHT_FOR_STATE, data = monthly_income_data, nest = TRUE)
    state.total.income <- svyby(~income),
        by= ~STATE+YEARMON, design = srvydsgn, svytotal, keep.var=FALSE)

state.total.income will be a monthly timeseries of aggregate household income.

I think it will be useful to have a section of the documentation of the package on moving from R to Julia.

@grahamstark
Copy link
Owner

Hi Ayush,

thanks for this. I confess I've never used R Survey Design but will have a look at what it's doing. Or could you explain what the code above does?

thanks for your interest,

Graham

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants