I will illustrate my question with an example.
Say I have a variable called Temperature for 100 years in a country X.
I would like to create a variable Temperature_Record such that for year n Temperature_Record=max(Temperature(year 1:year n))
That is I want it to record the maximum temperature reached as of year n. This will give me a variable that will only increase over time naturally.
In addition I would like to do that in a panel of countries if possible.
Thoughts very much appreciated. I am new to STATA.
Thank you
Related Posts with Record-to-date value in a time series or panel
Command for matching*across*a dummy-variable?Dear Statalisters, I want to match (pscores of) observations across pre- and post-intervention. Thi…
Saving part of a datasetHi, I have 33 variables and 1000 participants. The 33rd variable has 20 participants with data enter…
Removing the line below each headingDear Stata users, I have drawn a combined graph as below and would like to remove the line below ea…
Unbalanced panel with xtregHello I am using unbalanced panel for the first time. I would like to know if it is possible to use …
Splitting string into column vectorDear Statalist, I am currently working with a dataset consisting of research articles, where a give…
Subscribe to:
Post Comments (Atom)
0 Response to Record-to-date value in a time series or panel
Post a Comment