Dear Statalisters,
I have 1696 variables for which there daily values available for a period of 16 years. For instance, I have 252 values for first year for first variable, 252 values for second year for first variable and so on. I want to calculate the year-wise standard deviation of each variable and store it one by one separately for all 1696 variables. I have done this for one variable by using the following command.
bysort Year: egen SDVariable1 = sd( Variable1 )
A new variable gets created which has the standard deviation for each year for Variable1. Now, I would like to repeat this process for all 1696 variables so that 1696 new variables are created which contain standard deviation for all years for a particular variable.
Please guide me with a way to create new variables repeatedly
Thanks!
Related Posts with Creating new variables repeatedly
How do I loop through parts of the observations and impute missing valuesDear Statalist, My data looks like this id hypertension visit 1 . 1 1 0 2 2 . 1 2 . 2 2 1 3 3 . 1 …
nonlinear difference-in-differences with non-integer interaction termHi everyone ! I'm currently working on the effect of the german minimum wage of 2015 (8.5 EUR per h…
nonlinear difference-in-differences with non-integer interaction termHi everyone ! I'm currently working on the effect of the german minimum wage of 2015 (8.5 EUR per h…
Interpreting interaction term in random effects modelHello! I am investigating whether implementing GSCMP (green practices) and EMS (environmental manag…
ppml_panel_sg collapse datadear all, I use ppml_panel_sg for gravity model the matter is that I use monthly data so it has diff…
Subscribe to:
Post Comments (Atom)
0 Response to Creating new variables repeatedly
Post a Comment