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
Lagged control variablesHello all, I have panel data for different European countries for the period 1995-2007. In my fixed…
What is the full name of the GSPRE model in the spatial econometric models?The xsmle command can perform the following spatial econometric model analysis: i.e. SAR, SDM, SAC, …
Making household-level variables using individual-level variablesHello. I have a data set that has the following structure. hhcode member_id age 1 1 45 1 2 23 1 3 3…
Exporting out tabulated dataHow can we export out row tabulation in stata? I have these two variables ind and q29d. When I tabul…
Error message - 'equation [kappa] not found r(303) - when choosing parametric model in StataHello all, I am having trouble with a command in Stata and was wondering if anybody could shed some…
Subscribe to:
Post Comments (Atom)
0 Response to How to group time data
Post a Comment