Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2023-06-07 18:59:15
Size: 420
Comment:
Revision 3 as of 2023-06-08 00:23:43
Size: 492
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

Stata supports the following '''logic structures''' for programming.

Stata Logic

Stata supports the following logic structures for programming.


Operators


Conditional Processing


By

The by command prefix causes a command to be repeated within groups.

A common usecase of the by structure is for identifying duplciate cases.

sort foo bar baz
by foo bar baz: generate byte duplicate = cond(_N==1, 0, _n)


CategoryRicottone

Stata/Logic (last edited 2025-10-24 18:41:47 by DominicRicottone)