I have to use the R "survey" package and want to be sure to understand it.
I simulated data where the sample comes from a simple random sampling process. When I compare the result of the Pearson's chi-square test (chisq.test), and the results using svychisq, the p values slightly differ (though really very close), while I expected them to be the same. Am I missing something?
Besides, I want to compare some characteristics between two groups, from data coming from a sampling, with different sampling probabilities but the same probability inside each group (a control group where the sampling probability is 1/1000 for all controls, and an "exhaustive" case group : probability=1 for all cases). In that case, is there a real impact on the test, that justifies using the Rao-Scott chi-square test?