Update to a program for saving a model fit as a dataset



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
I

Yes

Event

I

No I

Total

Proportion

Yes

Groupl
Group2

I
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
estimate    I

[957. Conf

Interval]

Odds Ratio

I

4.5

I

2.939633

7.152252

. koopmani 36 40

16 so,

I
I

level(99)

Event

Yes

I

No I

Total

Proportion

Yes

Groupl
Group2

I
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
estimate    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
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
I

52

68 I

I

120

0.4333

I

I
_________________I___

Point

I
estimate    I

[907. Conf

Interval]

-----------------I---

Odds Ratio I

4.5

I

3.136696

6.632661



More intriguing information

1. The name is absent
2. The name is absent
3. Strategic Planning on the Local Level As a Factor of Rural Development in the Republic of Serbia
4. The name is absent
5. The name is absent
6. Input-Output Analysis, Linear Programming and Modified Multipliers
7. The name is absent
8. AGRICULTURAL TRADE IN THE URUGUAY ROUND: INTO FINAL BATTLE
9. The name is absent
10. Ruptures in the probability scale. Calculation of ruptures’ values