Differences between revisions 2 and 3
Revision 2 as of 2023-06-09 15:51:09
Size: 974
Comment:
Revision 3 as of 2025-10-24 17:12:42
Size: 966
Comment: Rewrite
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The '''`frlink`''' command joins data across [[Stata/Frames|frames]]. '''`-frlink-`''' joins data across [[Stata/Frames|frames]].
Line 43: Line 43:
[[https://www.stata.com/manuals/dfrlink.pdf|Stata manual for frlink]] [[https://www.stata.com/manuals/dfrlink.pdf|Stata manual for -frlink-]]

Stata FrLink

-frlink- joins data across frames.


Usage

frlink 1:1 KEYVARS, frame(foo)
frlink m:1 KEYVARS, frame(foo)

If the frame has differently-named key variables, try:

frlink 1:1 uid, frame(foo subid)
frlink m:1 uid, frame(foo subid)

In either case, a link variable is created with the same name as the frame (foo in this case). To rename this variable, use the generate(varname) option.

frlink dir lists the available link variables. frlink describe LINKVAR describes a link variable.

A read-only view of values in the linked frame can be accessed like:

generate foobar = foo + frval(linkvar, bar)

See also the fralias and frget commands.


See also

Stata manual for -frlink-


CategoryRicottone

Stata/FrLink (last edited 2025-10-24 17:12:42 by DominicRicottone)