help nspells

Title

nspells -- Calculate number of spells in a sequence

Syntax

nspells varlist , generate(string)

Description

nspells creates a variable holding the number of spells in a sequence described by the varlist. The
generate option names the variable, which will be created. Spells are defined as consecutive runs of the same value. Runs of missing values are counted as spells.

Author

Brendan Halpin, brendan.halpin@ul.ie

Examples

. nspells m1-m40, gen(nsp)