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
Issue with converting date in dd.mm.yy format to dd/mm/yyyyI have a historical dataset with teenagers' birthday in the format of dd.mm.yy, while they were all …
spmap: Horizontal legend with specified legend text optionsDear all, I'm trying to make a map with a nicer legend. I would like for the legend to look somethin…
Importing descriptive tables with outreg2Hello, I´m trying to export the results of this descriptive table to word using the command outreg2 …
Moving average invalid syntaxHi all, I'm creating my own moving average code since I only want the top four of the previous seve…
Bioequivalence for Dichotomous outcomes, and also with nested data.Seeking guidance for conducting a bioequivalence (or non-inferiortty) test comparing two groups, but…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with summing using Collapse
Post a Comment