ices-tools-dev / RDBEScore

Provides functions to work with the Regional Database & Estimation System (RDBES)
https://ices-tools-dev.github.io/RDBEScore/
GNU General Public License v3.0
0 stars 4 forks source link

add further tests to generateProbs #189

Open nmprista opened 1 year ago

nmprista commented 1 year ago

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

rix133 commented 1 month ago

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.