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

ignorefpc=true doesn't seem to work for SimpleRandomSample #110

Closed
iuliadmtru opened this issue Dec 2, 2022 · 3 comments
Closed

ignorefpc=true doesn't seem to work for SimpleRandomSample #110

iuliadmtru opened this issue Dec 2, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@iuliadmtru
Copy link
Contributor

iuliadmtru commented Dec 2, 2022

For SimpleRandomSample setting ignorefpc=true should result in fpc being equal to 1.0, since we allow fpc to be of type Float64. But this doesn't happen:

julia> srs_ignorefpc = SimpleRandomSample(apisrs; popsize = :fpc, ignorefpc = true)
┌ Warning: assuming all weights are equal to 1.0
└ @ Survey ~/Work/xKDR/Survey.jl/src/SurveyDesign.jl:162
SimpleRandomSample:
data: 200x42 DataFrame
weights: 1.0, 1.0, 1.0, ..., 1.0
probs: 1.0, 1.0, 1.0, ..., 1.0
fpc: 6194, 6194, 6194, ..., 6194
popsize: 6194
sampsize: 200
sampfraction: 0.0323
ignorefpc: true

For StratifiedSample the same code looks ok:

julia> strat_ignorefpc = StratifiedSample(apistrat, :stype; popsize = :fpc, ignorefpc = true)
┌ Warning: assuming all weights are equal to 1.0
└ @ Survey ~/Work/xKDR/Survey.jl/src/SurveyDesign.jl:360
StratifiedSample:
data: 200x45 DataFrame
strata: stype
weights: 1.0, 1.0, 1.0, ..., 1.0
probs: 1.0, 1.0, 1.0, ..., 1.0
fpc: 1, 1, 1, ..., 1
popsize: 4421, 4421, 4421, ..., 755
sampsize: 100, 100, 100, ..., 50
sampfraction: 0.0226, 0.0226, 0.0226, ..., 0.0662
ignorefpc: true

(there's also extra information that shouldn't be there, I mentioned this in issue #111.)

@iuliadmtru iuliadmtru added the bug Something isn't working label Dec 2, 2022
@smishr
Copy link
Contributor

smishr commented Dec 2, 2022

this means that the if condition that set fpc=1 is not being hit correctly for SimpleRandomSample

@iuliadmtru
Copy link
Contributor Author

This might be related to issue #93.

@iuliadmtru iuliadmtru changed the title ignorefpc=true doesn't seem to work ignorefpc=true doesn't seem to work for SimpleRandomSample Dec 5, 2022
@smishr
Copy link
Contributor

smishr commented Jan 4, 2023

we have changed designs too much for this issue to be open

@smishr smishr closed this as completed Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants