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. Enterpreneurship and problems of specialists training in Ukraine
2. WP 92 - An overview of women's work and employment in Azerbaijan
3. Who runs the IFIs?
4. EXECUTIVE SUMMARIES
5. Permanent and Transitory Policy Shocks in an Empirical Macro Model with Asymmetric Information
6. The name is absent
7. The urban sprawl dynamics: does a neural network understand the spatial logic better than a cellular automata?
8. Target Acquisition in Multiscale Electronic Worlds
9. Announcement effects of convertible bond loans versus warrant-bond loans: An empirical analysis for the Dutch market
10. The English Examining Boards: Their route from independence to government outsourcing agencies