Hello everyone,
I am trying to run a diff in diff in stata. I have more than 3,500 obs, some of them regarding the same individual in two different years, some of them regarding an individual in one of the two years. I have created an "id" variable and i sorted it, so now I can identify the individuals with two obs. The problem is I want to retain only these obs, the panel ones, and drop the obs regarding the individuals analyzed only in one year. Which command should I use? I'm relatively new to Stata, so sorry if the question is utterly trivial and thank you for the answers!
Related Posts with keep only panel obs
Predicting residuals from instrumental regressionModel : ivreghdfe itotf (qt = lagqt lagcfo) cfo, absorb(gvkey fyear) endog(qt) cluster(gvkey) resid …
Five Year Average Period. Each Variable?Dear all, I want to create five year average periods for my independent variables (FDI inflows) and…
Looping over two localsHello, I'm endeavoring to loop over two locals. The first local is made up variables consisting of …
linking data with a keyHello I need some help linking this data set So the variable taskdefinitionid is the numerical cod…
Using loop to import, edit, then export .csv filesHello, I am importing a large number of .csv files into Stata. Before I can import the files, I nee…
Subscribe to:
Post Comments (Atom)
0 Response to keep only panel obs
Post a Comment