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
Change vartypeHello, I have a dataset I have created myself from Excel, which is made mostly out of percentages an…
n and % for a series of binary variablesHi. I woud like to produce n and % for a series of binary variables in the same table. For example,…
Average Marginal Effects - Recursive Bivariate ProbitDear Statalisters, I would like to calculate the average marginal effects from a recursive bivariate…
Removing top 0.5% of a variableHi, I have a variable from a large dataset and I have read published literature by previous authors…
How to correct autocorrelation in a multiple regression?Hello everyone on statalist! Hope you had a great weekend. I am working on a project and have run i…
Subscribe to:
Post Comments (Atom)
0 Response to Analysing observations based on a year point
Post a Comment