Is there any way to use glm() function or Bayesian Network to check whether the two binomial data are equivalent. More to point, I have two binomial (success=1 and failure=0) datasets and intend to apply a statistical test to show whether they are statistically equivalence or not. First dataset (x) includes around 164 data points in which 58 of them are "1" and the rest are "0". The second dataset/group (y) consists of 280 data points in which 113 of the are "1" and the rest are "0". So my question is how can I applied equivalence test with above approach? is there any function or package that I can use in r to apply the test?
Asked
Active
Viewed 63 times
0
-
Needs more information, explain the variables. – user2974951 Sep 27 '18 at 06:38
-
I have edited the question. – nahid khosh Oct 12 '18 at 07:59
-
I don't know why you are referencing glm or BN, have a look at https://stats.stackexchange.com/questions/123609/exact-two-sample-proportions-binomial-test-in-r-and-some-strange-p-values – user2974951 Oct 12 '18 at 08:29
-
The problem is defining the null- hypothesis in prop.test. I am not sure that prop.test() is the right test for equivalency test that the null-hypothesis "H0" is "the two groups are different" and the alternative hypothesis H1 is "the two groups are similar". Hence, we try to find an evidence --p value < 0.05 - to reject the H0 to say that the two groups are similar, or the difference that do exist between them are minor. If it is the right test. I already applied and got the following result: – nahid khosh Oct 12 '18 at 09:45
-
prop.test(c(58, 106),c(113, 167),alt = 't',correct=F) data: c(58, 106) out of c(113, 167) X-squared = 4.09, df = 1, p-value = 0.042 95 percent Cl: -0.2390 -0.00387 – nahid khosh Oct 12 '18 at 09:53
-
That's exactly what prop.test does, quote `prop.test can be used for testing the null that the proportions (probabilities of success) in several groups are the same, or that they equal certain given values.`. Maybe you have trouble with the hypothesis, yours are not in the correct order. The null hypothesis is always one of no change / difference. – user2974951 Oct 12 '18 at 10:08
-
Yes, here is the point. Almost all statistical tests the null-hypothesis are "no change/difference", as you said. But, in equivalency test is the other way around. When we want to prove that these two groups are equivalent or the difference is minor or not significant, the positive result is that we can reject the null hypothesis, not failing to reject the null (I did this test with chi-square test and I failed to reject the null and I concluded that the two groups are not statistically different, which is not a correct way to do). – nahid khosh Oct 12 '18 at 11:57
-
If I correctly got your point is that the null hypothesis in prob.test is -there is a different between these two groups", and the alternative is -- the two groups are similar-- so the above result shows that the two groups are not statistically different since it can reject the null with p=0.042, right? – nahid khosh Oct 12 '18 at 12:02
-
No, the null is that the proportions ARE equal, so your p-value is rejecting the null, meaning the two proportions are NOT equal. – user2974951 Oct 12 '18 at 12:07
-
Ok, I got now your point. Therefore, if we want to prove that these two groups are equivalent, prob.test is not the correct test. Indeed, practically it is correct, but statistically no, failing to reject is not a good result. – nahid khosh Oct 12 '18 at 12:15
-
No, statistically it IS correct, you have shown that the two proportions are indeed NOT equal. Your statement about "failing to reject is not a good result" is telling me that you really want these to be equal, which sounds like a fishing expedition. – user2974951 Oct 12 '18 at 12:19