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
Coefplot, only plotting some of the variablesHi, I have a problem with Coefplot. I have tried the different answers I have found here from earli…
forvalues with indefinite end valueI would like to use a do loop to read in a series of excel files, save them as .dta files, then appe…
Xtreg vs REGFEHD, time varied weightsI am running a panel regression with the returns of various mutual funds as a function of time varie…
ZIPPKG: module to create ZIP archives of community-contributed content for offline distribution now on SSCDear Statalist community, thanks, as always, to KitBaum, a new user written command named zippkg is…
Interaction term and lincomHi all, I am running a basic interaction model y=b0 + b1X1 + b2D + b3X1*D. where D is a dummy varia…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with summing using Collapse
Post a Comment