/*-------------------------------------------- Read in data from SAS transport file File ex2_prep.do Gillian Raab August 04 ------------------------------------------------*/ clear /*-------------------------- now read in file from SAS transport file cd "c:/documents and settings/gillian raab/my documents/aprojects/peas/web/exemp2/data" ------*/ cd "f:/peasnew/ex2datafiles/data" fdause ex2.xpt,clear /*------------------------------------------- value labels for all the variables This is to get over the problem of assigning SAS formats in Stata which I could not get to work. Any offers to help would be welcome ---------------------------------------------*/ label define council 100 " Aberdeen City " label define council 110 " Aberdeenshire ",add label define council 120 " Angus ",add label define council 130 " Argyll & Bute ",add label define council 150 " Clackmannanshire ",add label define council 170 " Dumfries & Galloway ",add label define council 180 " Dundee City ",add label define council 190 " East Ayrshire ",add label define council 200 " East Dunbartonshire ",add label define council 210 " East Lothian ",add label define council 220 " East Renfrewshire ",add label define council 230 " Edinburgh, City of ",add label define council 235 " Eilean Siar ",add label define council 240 " Falkirk ",add label define council 250 " Fife ",add label define council 260 " Glasgow City ",add label define council 270 " Highland ",add label define council 280 " Inverclyde ",add label define council 290 " Midlothian ",add label define council 300 " Moray ",add label define council 310 " North Ayrshire ",add label define council 320 " North Lanarkshire ",add label define council 330 " Orkney Islands ",add label define council 340 " Perth & Kinross ",add label define council 350 " Renfrewshire ",add label define council 355 " Scottish Borders ",add label define council 360 " Shetland Islands ",add label define council 370 " South Ayrshire ",add label define council 380 " South Lanarkshire ",add label define council 390 " Stirling ",add label define council 395 " West Dunbartonshire ",add label define council 400 " West Lothian ",add label define sex 1 "male" 2 "female" label values council council label values sex sex label define hours 1 "Up to 1 hour a week" 2 "Over 1 hour, up to 5 hours " 3 "Over 5 hours up to 10 hours" label define hours 4 "Over 10 hours up to 20 hours " 5 "Over 20 hours",add label values rc5 hours label define employ 1 "Self employed" 2 "Employed full time" label define employ 3 "Employed part time",add label define employ 4 "Looking after the home or family " 5 "Permanently retired from work " ,add label define employ 6 "Unemployed and seeking work " 7 "At school ",add label define employ 8 "In further/higher education " 9 "Gov't work or training scheme ",add label define employ 10 "Permanently sick or disabled " 11 "Unable to work because short-term ill ",add label define employ 12 "Pre school" 13 "Other",add label values emp_sta employ label define rural 1 "Urban settlements of over 125,000 pop" 2 "Other urban " 3 "Small access towns,3-10k" label define rural 4 "Small remote towns, pop 3-10k" 5 "Accessible rural, pop<3k, drive<30" 6 "‚Remote rural, pop<3k, drive>30",add label values shs_6cla rural label define groupinc 1 "missing" 2 "under 10K" 3 "10-20K" 4 "20-30k" 5 "30-50k" 6 "50K+" label values groupinc groupinc format uniqid %15.0f /*------- save "C:\Documents and Settings\gillian raab\My Documents\aprojects\peas\web\exemp2\data\ex2.dta",replace ------*/ save "f:\peasnew\ex2datafiles\data\ex2.dta",replace