The name is absent



Stata Technical Bulletin

33


Takayama, N. 1979. Poverty, income inequality, and their measures: Professor Sen’s axiomatic approach reconsidered. Econometrica 47.

Thon, D. 1979. On measuring poverty. Review of Income and Wealth 2 5: 429-440.

sg109 Utility to convert binomial frequency records to frequency weighted data

Mario Cleves, Stata Corporation, [email protected]

[Editor’s note: There are no help files or ado-files for this insert as this is an undocumented command in Stata 6.]

Syntax

bitowt case#_var pop~var [if exp [in range [, case (eewvareame) weight(ewvaamame) ]

Description

bitowt converts binomial frequency records to frequency weighted data. case#_'var specifies the variable containing the
number of cases represented by each observation and pop.var specifies the corresponding number of total subjects (cases plus
controls). This command will change the data in memory.

Options

case (eewarmame) specifies the name of a new binomial case-indicator variable containing 1 for cases and 0 for controls. If
case() is not specified, case(_case) is assumed.

weight (eewvareame) specifies the name of a variable that will contain frequency weights. If weight () is not specified,
weight (.weight) is assumed.

Remarks

bitowt is a utility that converts binomial frequency data to frequency weighted data. Binomial frequency data can be
directly analyzed with epitab’s cc, tabodds and mhodds commands, but has to be converted if other commands such as
poisson or logistic are to be used.

In each record of a binomial dataset there is a variable indicating the number of cases, a variable indicating the total number
of subjects (cases plus controls), and additional variables. For example, the following is a binomial dataset:

. list in 1/8

agegrp

tobacco

D

N

1.

25-34

0-9

0

140

2.

25-34

10-19

2

38

3.

25-34

20-29

0

22

4.

25-34

30+

0

32

ε.

35-44

0-9

4

218

6.

35-44

10-19

8

92

7.

35-44

20-29

6

54

8.

35-44

30+

0

34

Each observation has a variable indicating the observed number of cases, D, out of N subjects in the corresponding age
group and tobacco-use stratum. That is, in the first observation, there are no cases out of 140 subjects age 25 to 34 who use 0
to 9 grams of tobacco per day. In the second observation, there are 2 cases out of 38 subjects age 25 to 34 who use 10 to 19
grams of tobacco per day, and so on.

We can use the cc, mhodds and tabodds commands directly on these data by specifying the binomial () option. The
data, however, needs to be converted to single record or frequency record data in order to use other Stata commands.

The bitowt command can convert our binomial data to frequency data.

. bitowt D N

. list agegrp tobacco .case .weight

agegrp

tobacco

_case

.weight

1.

25-34

0-9

0

140

2.

25-34

0-9

1

0

3.

25-34

10-19

0

36

4.

25-34

10-19

1

2

5.

25-34

20-29

0

22

6.

25-34

20-29

1

0

7.

25-34

30+

0

32



More intriguing information

1. Dendritic Inhibition Enhances Neural Coding Properties
2. THE UNCERTAIN FUTURE OF THE MEXICAN MARKET FOR U.S. COTTON: IMPACT OF THE ELIMINATION OF TEXTILE AND CLOTHING QUOTAS
3. Disentangling the Sources of Pro-social Behavior in the Workplace: A Field Experiment
4. Fiscal Reform and Monetary Union in West Africa
5. Eigentumsrechtliche Dezentralisierung und institutioneller Wettbewerb
6. A Dynamic Model of Conflict and Cooperation
7. PACKAGING: A KEY ELEMENT IN ADDED VALUE
8. Group cooperation, inclusion and disaffected pupils: some responses to informal learning in the music classroom
9. Staying on the Dole
10. Integration, Regional Specialization and Growth Differentials in EU Acceding Countries: Evidence from Hungary
11. Opciones de política económica en el Perú 2011-2015
12. The name is absent
13. Foreword: Special Issue on Invasive Species
14. Contribution of Economics to Design of Sustainable Cattle Breeding Programs in Eastern Africa: A Choice Experiment Approach
15. ROBUST CLASSIFICATION WITH CONTEXT-SENSITIVE FEATURES
16. Multiple Arrhythmogenic Substrate for Tachycardia in a
17. How Low Business Tax Rates Attract Multinational Headquarters: Municipality-Level Evidence from Germany
18. The name is absent
19. Are Public Investment Efficient in Creating Capital Stocks in Developing Countries?
20. Developments and Development Directions of Electronic Trade Platforms in US and European Agri-Food Markets: Impact on Sector Organization