I have a number of variables with the a time subscript (0, 6 ,8, and 10). I wish to create a stacked variables from these into, for example, v0_6, v0_8, v0_10 using the command
. I wish to retain the original variables. The following code stops looping after the first variable. Here is the code and the warning message.
The warning message is:
I would be grateful for any advice on how to modify my code so that the code loops through all variables and keeps everything in one file. many thanks.
HTML Code:
-stack-
HTML Code:
foreach v in SkinTodayChild SkinTodayParent SCORADExtTotal SCORADIntTotal SCORADSubPruritus SCORADSubSleepLoss ///
SCORADSubTotal SCORADFinalTotal CDLQI_Score CDLQIP_Score IDQOL_Score FDLQI_Score ///
POEMP_Score POEMC_Score DFI_Score InvGlobalAssess EczFlaresNumber AsthmaBTSStep {
stack `v'0 `v'6 `v'0 `v'8 `v'0 `v'10, into(`v'0_6 `v'0_8 `v'0_10 ) wide
}
HTML Code:
Warning: data in memory will be lost.
Press any key to continue, Ctrl-Break to abort.
variable SkinTodayParent0 not found

Comment