Hi
How do I generate a mean variable sorted by both year and origin?
I want to generate the mean value of a variable by month and by origin
My best suggestion is:
egen mean_var = mean(var), by(month & origin)
but Stata says "& invalid name"
Related Posts with egen mean_var = mean(var), by(xx & xx)
Interpolation of unbalanced panel dataDear all, I am currently working with unbalanced panel data which I need to prepare for regressions…
Interpreting ivreg2 resultsDear Statlisters, Someone recommended me to run an ivreg2 on stata. However, I am quite new to the …
Replacing variable labels if same prefix, different suffixI have multiple sheets of excel that I import one by one into Stata. Each of the sheets has about 15…
looping and creating tablesHello, I am trying to create multiple tables using looping for ptfidelity_1_ - ptfidelity_11_ below.…
F statistic (& testparm) after a clustered FEHello Question 1: If I am running this model: xtreg dv iv1 iv2 iv3 i.year cluster(country), fe a…
Subscribe to:
Post Comments (Atom)
0 Response to egen mean_var = mean(var), by(xx & xx)
Post a Comment