hello I need your help
if I want to organize my data and group it by week.
for example, I want to calculate a variable, form this Wednesday to next Tuesday. How do I group it?
specifically, I want to generate a variable in a group of this Wednesday to next Tuesday.
I attach my dataset picture.
I want to get the below code to perform
"collapse (sum) nOI5 nOI10, by(i want to say =>form this Wednesday to next Tuesday)"
However, I don't know how to write a code that a group of this Wednesday to next Tuesday in the variable of the date.
for example
date id
3 1
4 1
5 1
1 1
2 1
I mean is that " egen id = group(i want to say =>form this Wednesday to next Tuesday)
If you know, please tell me
thank you very much
Related Posts with How to group time data
Problem with saving graphs with wildcard in namesHi there! I'm having some difficulties saving and combining graphs that I have created using a fore…
Writing GMM moment conditions for IPWHi all, I am trying to estimate the ATE of an IPW model by writing a GMM code. I am having trouble …
Removing duplicates across several variables in panel data and keep the dup with non-missing valuesHi As the title suggests, I am trying to remove duplicate values across several variables (c30) in …
xtreghello, I have a dataset on which I want to perform an OLS. The dataset looks like this: dependent v…
Reassigning records with missing values to existing categories considering the existing distribution within the populationDear Statalist, I am struggling to reassign records with a missing value on the categorical variabl…
Subscribe to:
Post Comments (Atom)
0 Response to How to group time data
Post a Comment