Hello,
I have a dataset which is organised by id and quarter. I want to create a variable, based on a variable of the dataset, and it should look something like this:
egen var1=count(var) if var==1 & var==2, by(id quarter)
This type of code has worked for me previously, but now it is generating missing values.
Does anyone know what could be the problem?
Thank you
Related Posts with egen var1= count(var), by(id quarter) - generating missing values
predicted values from repeat regression model differentHello, I ran a OLS regression model with 59,000,000 observations and 1000+ plus variables. When I …
What is the difference between" i.county|trend " and " i.county##c.trend "?In the process of learning the code, I found this way of writing: "i.county|trend" (county is the co…
Year fixed effects in panel datai am using panel data from 1990 to 2017 for 43 countries. I have two alternate dependent variables "…
Reproducing outputs from finite mixture model user written package in Stata 16Hello, I am working with someone else's code applying a fmm. The below code shows an example f outp…
drop observationspost should be deleted …
Subscribe to:
Post Comments (Atom)
0 Response to egen var1= count(var), by(id quarter) - generating missing values
Post a Comment