Question: The file trips.dat has raw data on trips in the Portland Household Activity/Travel Survey. The variables are: sampno : day : persno : actno :
The file trips.dat has raw data on trips in the Portland Household Activity/Travel Survey. The variables are: sampno : day : persno : actno : tt1 : tt2 : mode : orig : dest : distance Household sample number (6 digits) day (1 digit, either day 1 or day 2) person number in household (1 digit) activity number (2 digits) Travel time estimate 1 Travel time estimate 2 Travel mode Origin zone destination zone : distance Travel modes are Auto for personal automobile, Bus, Walk, NPveh for non-personal vehicle, and Oth for other modes. The first line of the data set is: 2000071101,5.55,5.33,Auto,10,29,1.77 The variables are SAMPNO=200007, DAY=1, PERSNO=1, ACTNO=01, TT1=5.55, TT2=5.33, MODE=Auto, ORIG=10, DEST=29 and DIST=1.77. Write a proc format to change distance in miles to distance to values that says a distance is A long way if the distance is greater than 4 miles, A medium distance for 2-4 miles, and Not too far if it is less than 2 miles. Again print the first 20 observations. 2000071101,5.55,5.33,"Auto",10,29,1.77 2000071104,9.65,9.46,"Auto",29,786,3.64 2000071201,5.55,5.33,"Auto",10,29,1.77 2000091102,3.83,3.47,"Bus",1,11,.72 2000091103,3.76,3.47,"Walk",11,1,.78 2000091104,.65,.58,"Walk",11,11,.18 2000091202,1.04,.98,"Walk",11,11,.4 2000091203,1.03,.97,"Walk",11,11,.28 2000101101,3.17,3.17,"Auto",12,47,1.54 2000101102,16.81,14.39,"Auto",773,12,5.49 2000101103,14.57,14.34,"Auto",29,773,6.43 2051501104,.53,.52,"Walk",29,29,.23 2051501105,7.16,6.23,"Auto",47,29,3.1 2051501106,14.24,13.2,"Auto",92,47,7.24 2051501107,13.64,13.21,"NPveh",47,92,7.45 2051501201,18.93,16.64,"Auto",146,47,8.74 2051501202,16.57,15.6,"Auto",47,146,8.81 2051501203,9.46,8.4,"Auto",33,47,4.08 2051501204,6.38,6.22,"Auto",29,33,2.63 2051501205,7.2,6.27,"Auto",47,29,3.12 2051501206,9.11,8.55,"NPveh",714,47,3.81 2051501207,.19,.19,"Walk",714,714,.07 2051502101,3.17,3.17,"Auto",12,47,1.54 2051502102,16.43,13.43,"Auto",772,12,5.63 2051502103,13.78,13.55,"Auto",29,772,6.28 2051502104,.53,.52,"Walk",29,29,.23 2051502105,7.16,6.23,"Auto",47,29,3.1 2051502106,14.24,13.2,"Auto",92,47,7.24 2051502107,13.64,13.21,"Auto",47,92,7.45 2051502201,3.94,3.86,"Auto",2,47,1.83 2051502202,4.71,4.13,"Auto",47,2,1.82 2051502204,9.46,8.4,"Auto",33,47,4.08 2051502205,6.38,6.22,"Auto",29,33,2.63 2051502206,7.2,6.27,"Auto",47,29,3.12 2051502207,9.11,8.55,"NPveh",714,47,3.81 2051502208,1.7,1.57,"Walk",715,714,.7 2051502209,8.79,8.24,"NPveh",47,715,4.24 2000151203,4.21,3.95,"Oth",10,17,1.16 2000151204,8.39,7.32,"Oth",31,10,2.96 2000151205,6.51,6.49,"Oth",17,31,2.91 2000201104,5.69,4.98,"Bus",847,17,1.96 2000201105,5.49,5.32,"Walk",17,847,2.02 2000201106,.69,.69,"Walk",17,17,.23
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
