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
inquire about ORDERED LOGISTIC REGRESSIONI am studying people's financial stress. I have a set of 10 items to measure financial stress (1-4 L…
categorical variable sample sizesHi, I am running a regression using the following code: Code: reghdfe incvote i.X controls, absorb…
directions of endogenous coefficients are the opposite in simultaneous equation modelHi everyone, I'm running simultaneous equation model (2 equations) but getting a weird result. My a…
Looping over many valuesDear Statalist, I've came across a problem I couldn't solve. I have a dataset indicting informatio…
Merging DataHello all, I have two datasets: one has a column of geographic identifiers and one has a column of …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with summing using Collapse
Post a Comment