Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: combining panel data values


From   Sean Lunde <[email protected]>
To   [email protected]
Subject   Re: st: RE: combining panel data values
Date   Tue, 21 Oct 2008 14:22:13 -0400

Nick,

by combine, I mean that my data is organized like this:


Month | Sales | Brand

1	|	25	|	1
2	|	13	|	1
3	|	19	|	1
4	|	23	|	1
1	|	21	|	2
2	|	17	|	2
3	|	19	|	2
4	|	26	|	2
1	|	11	|	3
2	|	19	|	3
3	|	19	|	3
4	|	28	|	3

What I want to do, is combine the values of sales when brand is equal to 1 with the values when brand is equal to 2, creating a new brand, with observations for each month. However, I want to keep the data organized in the time periods.


Thanks,


Sean






On Oct 21, 2008, at 2:06 PM, Nick Cox wrote

What does "combine" mean? If it means add, then know that

gen z = x + y

is the way to add two variables to produce a third.

Nick
[email protected]

Sean Lunde


I am working with a set of panel data grouped by brand (the panel var)
and date (the time var). I want to combine the values of some of the
brand variables together,( e.g. combine the salesdollar value for
brand x with salesdollar value for brand y). All of the variables I
want to combine are numeric.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index