18
Stata Technical Bulletin
STB-58
Options
level (#) specifies the confidence level, in percent, for confidence intervals. The default is level (95) or as set by set level.
Examples
The likelihood ratio that a diagnostic procedure will detect a certain disease is defined as the ratio of the fraction of true
positives to the fraction of false positives. To determine this likelihood ratio, θ, for which mainly high values are of interest,
m = 40 diseased persons were tested from whom x = 36 had a positive test, and n = 80 nondiseased persons were tested from
whom y = 16 had a positive test. We can now use koopman to compute the point estimate of θ and its confidence intervals.
. koopmani 36 40 16 80
I |
Yes |
Event |
I No I |
Total |
Proportion Yes | |
— Groupl |
I |
36 16 |
4 I 64 I |
40 80 |
0.9000 0.2000 | |
— Total |
I I |
52 |
68 I |
120 |
0.4333 | |
I I I_____ |
Point |
I |
[957. Conf |
Interval] | ||
— Odds Ratio |
I |
4.5 |
I |
2.939633 |
— 7.152252 | |
— . koopmani 36 40 |
16 so, I |
level(99) Event Yes |
I No I |
Total |
— Proportion Yes | |
— Groupl |
I |
36 16 |
4 I 64 I |
40 80 |
0.9000 0.2000 | |
— Total |
I I |
52 |
68 I |
120 |
0.4333 | |
I I_____ |
Point |
I |
[997. Conf |
Interval] | ||
— Odds Ratio |
I |
4.5 |
I |
2.598043 |
— 8.283284 |
koopman works like koopmani except that it obtains the entries in the tables by summing data. We specify three variables.
The first represents whether the event occurred, the second represents which group the observation belongs to, and the third
variable a weight that gives the total number of subjects in this observation. An observation may reflect a single subject or a
group of subjects. If an observation represents a single subject, we have the individual data in which the weight for each subject
is 1.
. clear
. use koopman
. list
event group pop
1. 1 1 36
2. 0 1 4
3. 1 2 16
4. 0 2 64
. koopman event group [freq=pop], level(90)
I |
Yes |
Event |
I No I |
Total |
Proportion Yes |
-----------------+— |
— | ||||
Groupl I |
36 |
4 I |
40 |
0.9000 | |
Group2 I |
16 |
64 I |
80 |
0.2000 | |
— | |||||
Total I |
52 |
68 I I |
120 |
0.4333 | |
I I |
Point |
I |
[907. Conf |
Interval] | |
-----------------I--- Odds Ratio I |
4.5 |
I |
3.136696 |
6.632661 |
More intriguing information
1. The name is absent2. How do investors' expectations drive asset prices?
3. The name is absent
4. Input-Output Analysis, Linear Programming and Modified Multipliers
5. Global Excess Liquidity and House Prices - A VAR Analysis for OECD Countries
6. Equity Markets and Economic Development: What Do We Know
7. Inhimillinen pääoma ja palkat Suomessa: Paluu perusmalliin
8. TLRP: academic challenges for moral purposes
9. Managing Human Resources in Higher Education: The Implications of a Diversifying Workforce
10. Competition In or For the Field: Which is Better