Differences between revisions 3 and 4
Revision 3 as of 2023-06-08 01:05:56
Size: 346
Comment:
Revision 4 as of 2025-10-24 17:14:08
Size: 372
Comment: Rewrite
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The '''`generate`''' command creates a new variable '''`-generate-`''' creates a new variable.

See also [[Stata/EGen|-egen-]].

Stata Generate

-generate- creates a new variable.

See also -egen-.


Usage

generate foo = 1
generate bar = "2" if foo==1
generate byte baz = 3


See also

Stata manual for generate


CategoryRicottone

Stata/Generate (last edited 2025-10-24 17:14:08 by DominicRicottone)