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. Bidding for Envy-Freeness: A Procedural Approach to n-Player Fair Division Problems
4. Nonlinear Production, Abatement, Pollution and Materials Balance Reconsidered
5. The growing importance of risk in financial regulation
6. The name is absent
7. Are combination forecasts of S&P 500 volatility statistically superior?
8. Tastes, castes, and culture: The influence of society on preferences
9. Dendritic Inhibition Enhances Neural Coding Properties
10. Ruptures in the probability scale. Calculation of ruptures’ values
11. The use of formal education in Denmark 1980-1992
12. LAND-USE EVALUATION OF KOCAELI UNIVERSITY MAIN CAMPUS AREA
13. Placenta ingestion by rats enhances y- and n-opioid antinociception, but suppresses A-opioid antinociception
14. The name is absent
15. A COMPARATIVE STUDY OF ALTERNATIVE ECONOMETRIC PACKAGES: AN APPLICATION TO ITALIAN DEPOSIT INTEREST RATES
16. Has Competition in the Japanese Banking Sector Improved?
17. Economie de l’entrepreneur faits et théories (The economics of entrepreneur facts and theories)
18. Studying How E-Markets Evaluation Can Enhance Trust in Virtual Business Communities
19. Social Cohesion as a Real-life Phenomenon: Exploring the Validity of the Universalist and Particularist Perspectives
20. The Integration Order of Vector Autoregressive Processes