Hello everyone,
I have a dataset, where I looked for confidence interval for groups of "a test" coded from 0-10. I have around 1000 data points, and want the confidence interval for group 0 (110 have a test result of 0) for group 2 (50 have a test result 2) and so on. How is this possible in stata. I tried to use the frequencies but it still won't work, when I make a dataset with the amount of data points per each group and the test result (0-10), so:
then I tried ci prop frequency by(test) but got:
"factor variables and time-series operators not allowed"
The best would be if I could get a command how to do it in my original dataset where only the id and the result is written, but when it ís only possible in my new dataset with frequencies it is also ok
I manged to do it with the cii command:
cii prop 1000 110
but would be happy to find an easier way
Best regards
Henrik
I have a dataset, where I looked for confidence interval for groups of "a test" coded from 0-10. I have around 1000 data points, and want the confidence interval for group 0 (110 have a test result of 0) for group 2 (50 have a test result 2) and so on. How is this possible in stata. I tried to use the frequencies but it still won't work, when I make a dataset with the amount of data points per each group and the test result (0-10), so:
Code:
input frequency test 110 0 50 2 and so on...
"factor variables and time-series operators not allowed"
The best would be if I could get a command how to do it in my original dataset where only the id and the result is written, but when it ís only possible in my new dataset with frequencies it is also ok
I manged to do it with the cii command:
cii prop 1000 110
but would be happy to find an easier way

Best regards
Henrik
Comment