Assignment Information
Login / Sign Up to View Document
Sample Document Text
. doedit X:\sya6933\hw4\hw4.do
. do "X:\sya6933\hw4\STD00000000.tmp"
. /*******************
> HW#4: Question 1
> *****************/
. webuse set http://cdph.fsu.edu/sya6933/week8
(prefix now "http://cdph.fsu.edu/sya6933/week8")
. webuse example9,clear
. list
+-------------------------+
| hid sex year inc |
|-------------------------|
1. | 1 f 90 3200 |
2. | 1 f 91 4700 |
3. | 1 m 90 4500 |
4. | 1 m 91 4600 |
5. | 2 f 90 2350 |
|-------------------------|
6. | 2 f 91 4500 |
7. | 2 m 90 5600 |
8. | 2 m 91 6500 |
+-------------------------+
. /***long long to wide(sex) wide(year)***/
. reshape wide inc,i(hid sex) j(year) /**Step 1: reshape it to long(sex) wide(year)
first**/
(note: j = 90 91)
Data long -> wide
----------------------------------------------------...
© Copyright 2012 , Koofers, Inc. All rights reserved.
The information provided on this site is protected by U.S. and International copyright law, and other applicable intellectual property laws, including laws covering data access and data compilations. This information is provided exclusively for the personal and academic use of students, instructors and other university personnel. Use of this information for any commercial purpose, or by any commercial entity, is expressly prohibited. This information may not, under any circumstances, be copied, modified, reused, or incorporated into any derivative works or compilations, without the prior written approval of Koofers, Inc.