Hi
I want to test the difference between two paired proportions. I need the Confidence Interval for the difference between proportions. I have a paired design wherein each individual with known disease status d is administered two tests (t) with the test results in y. I need to test the hypothesis that the (proportion y = 1 with test 1) - (proportion y =1 with test 0) = 0 in people with d == 1. Part of the data is shown below.
When I read the prtest help, I understand that the difference between paired sample proportions needs the cluster() and rho() to be specified. I realize the cluster() in my case is cluster(id) but I am not sure about the rho(). How do I calculate the rho() for my data?
Is it
Please provide guidance.
I want to test the difference between two paired proportions. I need the Confidence Interval for the difference between proportions. I have a paired design wherein each individual with known disease status d is administered two tests (t) with the test results in y. I need to test the hypothesis that the (proportion y = 1 with test 1) - (proportion y =1 with test 0) = 0 in people with d == 1. Part of the data is shown below.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float id byte(test d y) 1 1 0 1 1 2 0 0 2 1 0 1 2 2 0 1 3 1 0 0 3 2 0 0 4 1 0 0 4 2 0 0 5 1 0 0 5 2 0 1 6 1 0 0 6 2 0 0 7 1 0 0 7 2 0 0 8 1 0 0 8 2 0 1 9 1 0 0 9 2 0 1 10 1 0 0 10 2 0 0 end label values d ynlbl label def ynlbl 0 "no", modify label values y negposlb label def negposlb 0 "-", modify label def negposlb 1 "+", modify
Is it
Code:
corr y test if d == 1
Comment