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

add further tests to generateProbs #189

Open
nmprista opened this issue Nov 17, 2023 · 1 comment
Open

add further tests to generateProbs #189

nmprista opened this issue Nov 17, 2023 · 1 comment
Labels
2_preparation Generating probabilities and Zero's, subsetting species 9_needs_more_tests Please add more tests

Comments

@nmprista
Copy link
Contributor

Present testing is incipient (n=3) - test for selection and inclusion with and without stratification are needed

@nmprista nmprista added the 2_preparation Generating probabilities and Zero's, subsetting species label Nov 17, 2023
@rix133 rix133 added the 9_needs_more_tests Please add more tests label Nov 17, 2023
@rix133
Copy link
Contributor

rix133 commented Oct 14, 2024

Here’s a list of tests that can be implemented to evaluate selection and inclusion probabilities with and without stratification for the generateProbs function. These tests will ensure the correct computation under different sampling scenarios.

  1. test_selection_SRSWR_without_stratification
    Check that selection probabilities for simple random sampling with replacement (SRSWR) are computed correctly for a single stratum.

  2. test_inclusion_SRSWR_without_stratification
    Validate the correct computation of inclusion probabilities for SRSWR without stratification.

  3. test_selection_SRSWOR_without_stratification
    Ensure that the function returns an appropriate error or behavior for selection probabilities under simple random sampling without replacement (SRSWOR) without stratification (since selection probabilities are not implemented for SRSWOR).

  4. test_inclusion_SRSWOR_without_stratification
    Verify that inclusion probabilities for SRSWOR are computed correctly in a non-stratified setting.

  5. test_selection_CENSUS_without_stratification
    Confirm that selection probabilities are set to 1 for the census method without stratification.

  6. test_inclusion_CENSUS_without_stratification
    Ensure that inclusion probabilities are set to 1 for the census method without stratification.

  7. test_selection_with_stratification_SRSWR
    Check that selection probabilities are correctly computed for SRSWR with stratified data (multiple strata).

  8. test_inclusion_with_stratification_SRSWR
    Validate the inclusion probabilities for SRSWR with stratified data.

  9. test_selection_with_stratification_SRSWOR
    Ensure the appropriate error or message is returned for selection probabilities for SRSWOR with stratified data.

  10. test_inclusion_with_stratification_SRSWOR
    Verify that inclusion probabilities are computed correctly for SRSWOR when stratification is applied.

  11. test_selection_with_stratification_CENSUS
    Confirm that selection probabilities are set to 1 for all strata in a census sampling scenario.

  12. test_inclusion_with_stratification_CENSUS
    Ensure that inclusion probabilities are set to 1 for all strata in a census sampling scenario.

These tests should cover various combinations of sampling methods, selection/inclusion probability types, and the presence or absence of stratification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2_preparation Generating probabilities and Zero's, subsetting species 9_needs_more_tests Please add more tests
Projects
None yet
Development

No branches or pull requests

2 participants