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
Double Selection in one equationIf double selection in one equation exists, which command do I have to use? I studied Heckman twost…
Replicate Values from one column to the other in an n-dimension arrayDear Statalists, I am a new Mata user and attempt replicating values from one column to the other i…
Generating a table that shows multiple ANOVA resultsDear Statalist, I want to generate a table that neatly summarizes a set of ANOVA results, just like…
Stationarity test for residual in panel dataHello everyone, I want to test the statinarity (panel) for the residual in my regression. I use Cod…
''omitted because of collinearity"While I am running regression in Stata, many times a variable is dropped due to collinearity. In the…
Subscribe to:
Post Comments (Atom)
0 Response to egen var1= count(var), by(id quarter) - generating missing values
Post a Comment