Dear all,
I have a dataset that contains a precise time when an observation was made ( formated as %tc_DD-NN-YY_HH:MM: SS.sss). My intention is to create another variable, that contains the previous observation's observation time. However, I am not familiar with lag variables. I tried reading through the tsset help, but no luck. Whenever I actually try to create the lag variable, I only get missing values.
Any tip on how I could create this variable?
Related Posts with Lag variable creation
Question regarding calculating percentages of distinct valuesHello, Using Stata 16.1 for Mac, I have been doing quite a bit of searching online to try to figure …
Line graph/ Monthly dataDear Stata users I have monthly data on stock prices form Jan-2019 to March-2020 for three types of …
Reporting probit/logit marginal effects for interaction terms in regression tableHi all, As is well known by many on this forum, there are some difficulties with calculating margin…
geocoding addresses to US census block groups and automationThe US Census has a neat online tool that lets you get the census tract and block group codes for up…
Problem in generating a new variableHello everyone, I have a question regarding generating a new variable in STATA. I am currently work…
Subscribe to:
Post Comments (Atom)
0 Response to Lag variable creation
Post a Comment