help mobs (User-written stata packages: mtab)

Title

mobs -- Store the results (number of repeated observations within specified variable categories) in matrix

Syntax

mobs
varlist
[if] [in]
[, options
]

Options
level specify level/number of variables. the default is 1

Description

Command mobs generates two variables obs obst which indicate the number of repeated observations in each categories.

Options

level specify number of variables to be conditioned on while count the number of repeated observations within each joined categories.

Examples

1. load an oneline data

.webuse nlswork

2. Count the number of repeated observations within each id

.mobs idcode year

After run the above command, you will discover how many repeated given the same idcode

.mobs idcode year, level(2)

After run the above command, you will discover how many repeated given the same idcode and the same year

More examples

click on her

Author

Chunsen Wu, the University of Southern Denmark; Odense University Hospital, Denmark

cwu@health.sdu.dk

chunsen.wu@rsyd.dk

Also see

Help: mtab, mtab1, mtab2, msum, mest, mmat, and mexcel