Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with summing using Collapse

    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.


Working...
X