Hi - I'm having a problem with the Collapse command when I try to obtain the sum of variables. My data is hourly (v1-v24) in wide format. I'm using it in a do file.
collapse (first) daytype_ weatheryr_ lcax year (mean) tmpf1-tmpf24 (sum) popcnt ref1-ref24 pvhr1-pvhr24 pwhr1-pwhr24 pxhr1-pxhr24 pyhr1-pyhr24 pzhr1-pzhr24, by(adjdate slapx)
error:
tmpf1 = (mean) tmpf1
tmpf1 = (sum) tmpf1
name conflict
r(198);
I'm not seeing the "name conflict". I used the command earlier in the same do file to get means and it worked.
Any suggestions would be welcome.
Related Posts with Problem with summing using Collapse
Eststo/esttab with sum of coefficients (dummies)Hello, Suppose I have Y as my dependent variable, and I have three dummies, d1, d2, d3. Suppose I r…
Stacked bar chart using pre-aggregated census dataHello, I have a table of aggregated data that I downloaded from Census. The first three years of the…
Strategy for analyzing 90 observations with a dichotomous dependent variableDear statalisters, I am involved in a project analyzing the effect of Environmental Impact Assessme…
Pooled cross section the best way to analyze non-panel longitudinal data?There are a bunch of datasets, e.g. world values survey, alcohol usage report etc which present good…
Non-typical periodicity in panel/time seriesWhen using tsset or xtset, there are a bunch of frequencies that are standard and can be set easily …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with summing using Collapse
Post a Comment