Hi everyone,
I'm having some doubts on the usage of the -collapse- command and I'm hoping you could help me on this.
I need to calculate the weighted average of a set of observations by year and municipality, weighted on a given variable (let's call it wgt). Will the following syntax work:
collapse (mean) var1 var2 [w=wgt] , by(year municipality)
my question is whether the [w=wgt] will apply to both the means of var1 and var2?
Thanks!
Helen
Related Posts with Question on using collapse
Panel data with small T small N and endogenous variableI have a panel data with small T (T = 11) small N (N=18) with 01 endogenous variable. Which methodol…
Reshaping categorical variablesHello Statalisters, I am facing the following problem. This is what my data looks like: Code: inp…
Reshaping categorical variablesHello Statalisters, I am facing the following problem. This is what my data looks like: Code: inp…
PLEASE HELP: "Convergence not achieved" errorHi, I am using xtgee command to estimate DP with IV in fractional form on a balanced panel data but …
rangestat questionHellow I have a question in rangestat why do I always get the result that never calculates? My mean …
Subscribe to:
Post Comments (Atom)
0 Response to Question on using collapse
Post a Comment