Stata Contract

The contract command creates a dataset of descriptive statistics.


Usage

Given a dataset like:

id

foo

bar

baz

1

0

0

10

2

1

0

20

3

0

0

10

4

1

0

20

5

0

1

10

6

1

1

20

7

0

1

10

8

1

1

20

Running contract foo bar would create a dataset like:

foo

bar

_freq

0

0

2

0

1

2

1

0

2

1

1

2

To rename the frequency variable, try the freq(varname) option.


Statistics

The contract command can compute additional descriptive statistics using these option:


See also

Stata manual for contract


CategoryRicottone

Stata/Contract (last edited 2023-06-08 01:04:44 by DominicRicottone)