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)
tabulate multiple variables with percentageHi, I need make table of age, sex, salary, hh_icnome by occupation in one table with only % figures…
Is this the correct Stata syntax for CF/2SRI with an ordinal probit in the first stage?Dear All, I am mostly an R user. But since I have not found a way yet to reproduce generalised resi…
How to identify the "case" corresponding to the min value obtain from summary statisitcs?Hello I have run the following summary stats and obtained the following: . . sum a_buy_gas_elec_ap…
Remove firms if fiscal year-end changesHello everyone, I have a question: for my research it's is relevant that there are no fiscal years-…
using macro variables in loopDear all, I am writing to ask for help in using macro variables in loops. My code is something as …
Subscribe to:
Post Comments (Atom)
0 Response to egen mean_var = mean(var), by(xx & xx)
Post a Comment