Open nmprista opened 1 year 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.
test_selection_SRSWR_without_stratification
Check that selection probabilities for simple random sampling with replacement (SRSWR) are computed correctly for a single stratum.
test_inclusion_SRSWR_without_stratification
Validate the correct computation of inclusion probabilities for SRSWR without stratification.
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).
test_inclusion_SRSWOR_without_stratification
Verify that inclusion probabilities for SRSWOR are computed correctly in a non-stratified setting.
test_selection_CENSUS_without_stratification
Confirm that selection probabilities are set to 1 for the census method without stratification.
test_inclusion_CENSUS_without_stratification
Ensure that inclusion probabilities are set to 1 for the census method without stratification.
test_selection_with_stratification_SRSWR
Check that selection probabilities are correctly computed for SRSWR with stratified data (multiple strata).
test_inclusion_with_stratification_SRSWR
Validate the inclusion probabilities for SRSWR with stratified data.
test_selection_with_stratification_SRSWOR
Ensure the appropriate error or message is returned for selection probabilities for SRSWOR with stratified data.
test_inclusion_with_stratification_SRSWOR
Verify that inclusion probabilities are computed correctly for SRSWOR when stratification is applied.
test_selection_with_stratification_CENSUS
Confirm that selection probabilities are set to 1 for all strata in a census sampling scenario.
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.
Present testing is incipient (n=3) - test for selection and inclusion with and without stratification are needed