Hi, I have a particular year point and I want to analyse observations after that year point and observations that were present both before and after that year point. I tried to create dummy variables in order to separate these observations out. Here is what I did:
I have data for two years 2002 and 2003. The data for each of these years is present for all the twelve months. The year point is February 2003.
So in order to analyse the observations that were present only for February 2003 and afterwards, I did the following :
summarize id if year==2003 & month=February|year=2003 & month==March|year=2003 & month==April|year=2003 & month==May|year=2003 & month==June|year=2003 & month==July|year=2003 & month==August|year=2003 & month==September|year=2003 & month==October|year=2003 & month==November| year=2003 & month==December
This code have appeared to work.
However, when I try to include observations that were present for both before and after February 2003, I cannot think of a way to use a similar command as above. (Note that there are observations that were present only before February 2003. However, these observations are not of interest. ) Does anyone have a better suggestion for doing this task? Any suggestions would be helpful. Thanks!
Related Posts with Analysing observations based on a year point
Estimate the C-score and G-score following Khan and Watts(2009) - Journal of Accounting and EconomicsAll: I tried to estimate the C-score and G-score following Khan and Watts(2009) - Journal of Account…
Replacing multiple values, with the same conditionHi All, Although the -replace- command is fairly intuitive, it is sometimes a bit tricky. Specific…
weighted transition matrixHello, I am working with a household survey panel data. I have weights (not integer, time varying) …
Visualizing an interaction termDear Statalist, I have just recently started using Stata, so this might be a rookie question. I ha…
Question on oneway anova and pairwise comparisonRecently, I'm conducting research, we would like to see some difference between different national i…
Subscribe to:
Post Comments (Atom)
0 Response to Analysing observations based on a year point
Post a Comment