I have two CSV files. One with all observations and one with value labels
The tables is as follows.
adjunkt1:
aar mand hoved
1988 0 2
1979 1 2
1967 0 1
labels1:
v1 v2 v3
mand 1 Mand
mand 0 Kvinde
hoved 1 ARTS
hoved 2 ST
hoved 99 Andet
As I have understood I need to create the labels automatically through forvalues-loop and then a foreach-loop to apply those labels to adjunkt1.dta but I have not been able to succeed.
Or maybe there is another way? Hope you can help me.
storage display value
variable name type format label variable label
---------------------------------------------------------------------------------------------------------------------------------------------
v1 str7 %9s
---------------------------------------------------------------------------------------------------------------------------------------------
v1 (unlabeled)
---------------------------------------------------------------------------------------------------------------------------------------------
type: string (str7)
unique values: 95 missing "": 0/476
The tables is as follows.
adjunkt1:
aar mand hoved
1988 0 2
1979 1 2
1967 0 1
labels1:
v1 v2 v3
mand 1 Mand
mand 0 Kvinde
hoved 1 ARTS
hoved 2 ST
hoved 99 Andet
As I have understood I need to create the labels automatically through forvalues-loop and then a foreach-loop to apply those labels to adjunkt1.dta but I have not been able to succeed.
Or maybe there is another way? Hope you can help me.
storage display value
variable name type format label variable label
---------------------------------------------------------------------------------------------------------------------------------------------
v1 str7 %9s
---------------------------------------------------------------------------------------------------------------------------------------------
v1 (unlabeled)
---------------------------------------------------------------------------------------------------------------------------------------------
type: string (str7)
unique values: 95 missing "": 0/476
Comment