Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: one data management question


From   Grace Jessie <[email protected]>
To   <[email protected]>
Subject   RE: st: one data management question
Date   Sun, 6 Mar 2011 03:06:38 +0000

Nick, thanks for reminder.
Indeed, I entered one data just to show my problem. My real data is large, so impossible to show to you.
It is added that the observation value "area?" of var is characteristic with four characters "area" and that only the indicative string to distinguish each portfolio "hot cold warm rainy" contains alphabetic characters in each portfolio.
That is all.
Thank you for any help.
Grace

> Date: Sat, 5 Mar 2011 19:32:25 +0000
> Subject: Re: st: one data management question
> From: [email protected]
> To: [email protected]
> 
> This looks like fake data intended to show the flavour of your problem.
> 
> Thanks, but I think a solution would be easier if you showed real data.
> 
> Nick
> 
> 2011/3/5 Grace Jessie <[email protected]>:
> 
> > I have a data like the following with only one variable---var.
> >
> > +-------+
> > | var |
> > |-------|
> > 1. | areaA |
> > 2. | 1 |
> > 3. | hot |
> > 4. | 3 |
> > 5. | 4 |
> > |-------|
> > 6. | 2 |
> > 7. | cold |
> > 8. | 4 |
> > 9. | areaB |
> > 10. | 1 |
> > |-------|
> > 11. | warm |
> > 12. | 6 |
> > 13. | 2 |
> > 14. | rainy |
> > +-------+
> > There are some areas and some big portfolios within each area in the data. The number of observations for each porfolio varies and the max is 4. If the observation number for each portfolio equals 4, the 4 observations represent id weather x y,respectively and orderly.If the number is less than 4, such as 3, it says the last observation for y is missing.The indicative string is "hot cold warm rainy" which is used to distinguish each portfolio. Each portfolio begins from the observation one before "hot cold warm rainy" and ends one before another portfolio begins.For example, there are two porfolios in areaA. One is "1 hot 3 4", and the other is "2 code 4".
> > Now I want to change the data to another one available for regression as follows.
> >
> > +-----------------------------+
> > | area id weather x y |
> > |-----------------------------|
> > 1. | A 1 hot 3 4 |
> > 2. | A 2 cold 4 |
> > 3. | B 1 warm 6 |
> > 4. | B 2 rainy |
> > +-----------------------------+
> > How to realize it?
> 
> *
> * 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index