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
If-Else IssueHello All, I have a rather interesting issue. I am attempting to use some if-else statements for so…
Vlookup in StataHello, There are four regions (Area Unit), and four people. The first table is the origin-destinati…
Difference-in-difference regression (?) with aggregate (state-level) pooled cross-sectional dataGreetings, I'm running Stata 15.1 on OSX and working with aggregate state-level data. My dependent …
Delete observations with older date within one yearDear Statalists, my data set looks like this: Meeting Date Year Company Attending Person 25ma…
How to make a ttest with conditions?Hi! I don't know how to create a ttest for this null hypothesis: - H0: b1 +4b3 <= 50 - H1: b1 +4b…
Subscribe to:
Post Comments (Atom)
0 Response to Creating new variables repeatedly
Post a Comment