Hello everyone,
I have tried to find a way to know how many candidates repeat and don't repeat in the same place through time. The thing is I have an append with lots of observations and these observations can be the same id in a different year.
I do not know whether this is a correct way to count: egen countnum=count( id ), by( year place )
Could anybody lend me a hand?
Thank you
Array
Related Posts with To count observations based on another variables
Interpreting coefficients of a continuous variable interacted with a categorial variable in regressionIn a xtlogit model Code: xtlogit mental_health i.gender i.age income#i.province Can I use Code: ma…
Help needed for Matplotlib in StataHi, I am using Stata 17 and was using some python codes to plot some bar charts. Below is my code: …
Scatterplot with weighted regression line using aaplot and lfitDear Statalist, I'm trying to graph a scatterplot with a regressionline. Instead of a standard OLS …
How to convert string id variable starting with "00" to numeric without losing the "00"?Hi, could any one help me with the following two issues? First, my id variable values start with 00…
Putexcel Loop over several cross tabulationsHello, I'd like to run some weighted cross-tabulations, and use putexcel to save the output in excel…
Subscribe to:
Post Comments (Atom)
0 Response to To count observations based on another variables
Post a Comment