Dear Stata community,
I'd like to generate a variable that records the number of unique values of a variable (var1) within each value of another variable (var2) over a rolling time window defined by a date variable.I cannot really come up with codes that could provide the results I'm looking for. I wondered if anyone could provide some thoughts? Any help would be greatly appreciated.
Related Posts with count number of unique values over a rolling time window defined by a date variable
Scatterplot with weighted regression line using aaplot and lfitDear Statalist, I'm trying to graph a scatterplot with a regressionline. Instead of a standard OLS …
How to convert string id variable starting with "00" to numeric without losing the "00"?Hi, could any one help me with the following two issues? First, my id variable values start with 00…
Help needed for Matplotlib in StataHi, I am using Stata 17 and was using some python codes to plot some bar charts. Below is my code: …
xttest0 invalid syntax R(111)Hello, I'm using stata 16 This is my code, Code: xtset com_id date, daily * LM test for penal wise…
Observations with missing cells in the data - should they be dropped?Hi all. I am organizing a panel data with information on the spending with government advertising by…
Subscribe to:
Post Comments (Atom)
0 Response to count number of unique values over a rolling time window defined by a date variable
Post a Comment