Hi users,
Considering the example in below, I wonder if it would be possible to generate a new variable (date2) and transmit the value of date to the new variable for each observation (ISIN) based on ISIN2. I am not sure which sort of commands help to get such a result as shown in table 1.
I would be grateful if someone could help me.
Example
input str12(ISIN ISIN2) int date
"GB0001771426" "GB0001771426" 20463
"GB0001771426" "NL0009739416" 20494
"GB0001771426" "SE0000103814" 20521
"GB0001771426" "PLTAURN00011" 20489
"GB0001771426"
"GB0001771426"
"GB0001771426"
"GB0001771426"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
Table1
Considering the example in below, I wonder if it would be possible to generate a new variable (date2) and transmit the value of date to the new variable for each observation (ISIN) based on ISIN2. I am not sure which sort of commands help to get such a result as shown in table 1.
I would be grateful if someone could help me.
Example
input str12(ISIN ISIN2) int date
"GB0001771426" "GB0001771426" 20463
"GB0001771426" "NL0009739416" 20494
"GB0001771426" "SE0000103814" 20521
"GB0001771426" "PLTAURN00011" 20489
"GB0001771426"
"GB0001771426"
"GB0001771426"
"GB0001771426"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"NL0009739416"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"PLTAURN00011"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
"SE0000103814"
Table1
ISIN | New variable (date2) | ISIN2 | Date |
GB0001771426 | 01/10/2016 | GB0001771426 | 01/10/2016 |
GB0001771426 | 01/10/2016 | NL0009739416 | 02/10/2016 |
GB0001771426 | 01/10/2016 | SE0000103814 | 03/08/2016 |
GB0001771426 | 01/10/2016 | PLTAURN00011 | 02/05/2016 |
GB0001771426 | 01/10/2016 | ||
GB0001771426 | 01/10/2016 | ||
GB0001771426 | 01/10/2016 | ||
GB0001771426 | 01/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
NL0009739416 | 02/10/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
PLTAURN00011 | 02/05/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 | ||
SE0000103814 | 03/08/2016 |
Comment