options linesize=79; /* here is the 25-card conjoint design for the farms */ /* see http://bluehen.ags.udel.edu/survey for info */ /* First we declare the variables that will be read in */ /* after the cards statement... */ /* ACRES = farm size in acres */ /* TYPE = "o" (orchard), "c" (crop) or "n" (nursery) */ /* COST = preservation easement cost per acre ($) */ /* PCTFOR = percent of parcel in forest, rest is farmed */ /* ADJOINS = 1 if parcel adjoins other protected */ /* farmland, = 0 otherwise */ /* FRONTAGE = percent of road frontage already lost to */ /* development */ /* DEVPASE = 1 if local development pressure is "high," */ /* = 0 if "moderate" */ /* LTVIAB = 1 if long-term viability of ag in area is */ /* "fair," = 0 if "poor" */ /* INCOME = annual net farm income from parcel ($) */ data farms; input card acres type $ cost pctfor adjoins frontage devpace ltviab income; /* then we create additional variables; first type */ /* dummiies; we'll treat "crop" (type="c") as default */ if type="o" then orchard=1; else orchard=0; if type="l" then livestck=1; else livestck=0; totcost=cost*acres; pctfarmd=100-pctfor; farmed=(100-pctfor)/100*acres; forest=pctfor/100*acres; /* then we read in the data. */ cards; 11 200 o 2000 40 1 25 1 1 60000 12 75 c 10000 10 1 0 1 0 12000 13 40 o 6000 10 0 0 1 0 60000 14 25 c 8000 40 0 25 0 1 12000 15 120 l 4000 40 0 50 0 0 60000 21 25 o 4000 10 1 0 1 1 60000 22 200 l 8000 40 0 0 1 0 12000 23 75 c 2000 40 0 50 1 0 60000 24 120 c 6000 10 1 25 0 1 12000 25 40 o 10000 40 0 25 0 0 60000 31 200 c 4000 10 0 25 1 0 60000 32 120 c 10000 40 0 0 1 1 60000 33 25 o 6000 40 0 50 1 0 12000 34 40 l 2000 40 1 0 0 1 12000 35 75 o 8000 10 1 25 0 0 60000 41 200 o 10000 10 1 50 0 1 12000 42 40 c 4000 40 1 25 1 0 12000 43 25 c 2000 10 0 0 0 0 60000 44 120 o 8000 40 1 0 1 0 60000 45 75 o 6000 40 0 25 1 1 12000 51 25 l 10000 40 1 25 1 0 60000 52 200 c 6000 40 1 0 0 0 60000 53 75 o 4000 40 0 0 0 1 12000 54 40 c 8000 10 0 50 1 1 60000 55 120 o 2000 10 0 25 1 0 12000 ; /* end of first data step creating 25 card observations. */ /* now we sort for eventual merge with the interview data */ proc sort; by card; /* now we create a second dataset from the survey data */ /* first, declare the variables to be read in after the */ /* cards statement below */ data respond; input rank1 rank2 rank3 rank4 rank5 rate1 rate2 rate3 rate4 rate5; /* Each line specifies the five card IDs sorted in preference */ /* order, then the five corresponding 0-10 Likert-scale ratings. */ /* First we create a block ID variable and 5 block dummies */ block=int(rank1/10); if block=1 then block1=1; else block1=0; if block=2 then block2=1; else block2=0; if block=3 then block3=1; else block3=0; if block=4 then block4=1; else block4=0; if block=5 then block5=1; else block5=0; /* Since different responents use different portions of the */ /* 0-10 rating scale, we calculate the mean, variance and std. */ /* deviation of each respondent's five farm ratings for */ /* normalizing ratings and calculating weights normalized to 1 */ /* (denominators determined from prior run of PROC MEANS) */ meanrate=mean(rate1,rate2,rate3,rate4,rate5); varrate=var(rate1,rate2,rate3,rate4,rate5)/6.9575921; stdvrate=std(rate1,rate2,rate3,rate4,rate5)/2.6377248; /* now it's time to expand from one obs per respondent to one */ /* obs per farm per respondent */ card=rank1; rank=1; rating=rate1; output; card=rank2; rank=2; rating=rate2; output; card=rank3; rank=3; rating=rate3; output; card=rank4; rank=4; rating=rate4; output; card=rank5; rank=5; rating=rate5; output; /* Obs 1-18 from Wilm Library WILMAPCO Comment Session, 9/18/95 */ /* Obs 19-36 from Brandywine HS WILMAPCO Comment Session, 9/19/95 */ /* Obs 37-54 from Middletown HS WILMAPCO Comment Session, 9/20/95 */ /* Obs 55-64 from FREC 444 class, 4/6/00 */ cards; 32 31 35 34 33 10 8 5 3 0 55 53 52 54 51 8 7 5 2 0 52 51 55 54 53 8 7 5 3 3 31 32 35 33 34 8 7 6 4 4 43 45 44 41 42 10 7 7 4 4 31 32 34 35 33 10 8 8 8 7 11 12 15 13 14 9 9 8 4 4 22 23 25 21 24 10 9 8 6 3 54 51 52 53 55 10 6 4 2 0 24 21 23 22 25 10 8 5 5 3 22 23 25 24 21 10 9 8 7 6 25 24 22 21 23 9 7 6 5 4 51 55 54 52 53 9 8 6 6 3 22 24 23 25 21 10 10 9 7 5 52 54 53 51 55 9 9 9 7 7 52 54 51 55 53 10 9 9 8 7 32 34 35 31 33 8 7 4 0 0 52 55 54 53 51 10 8 7 5 4 21 24 25 22 23 8 7 5 3 2 55 54 52 53 51 9 8 7 7 5 44 41 45 42 43 8 7 6 5 4 31 32 35 34 33 10 9 7 7 7 22 23 21 25 24 10 9 9 6 6 44 41 43 42 45 10 9 7 5 4 53 52 54 55 51 7 5 3 3 1 43 42 44 45 41 7 5 5 0 0 11 15 13 14 12 10 8 7 6 5 51 52 55 53 54 9 6 5 4 1 11 15 13 14 12 10 9 8 5 4 22 23 24 25 21 8 7 9 7 6 52 55 53 51 54 10 9 6 4 3 42 43 41 45 44 10 10 10 10 10 24 22 21 23 25 8 5 5 4 3 21 24 23 25 22 10 8 7 5 0 45 44 41 42 43 7 6 5 4 3 11 15 12 13 14 9 7 7 3 4 32 35 34 33 31 10 9 8 7 6 31 34 35 32 33 8 10 5 2 0 45 41 42 43 44 10 10 8 5 5 52 53 55 54 51 10 10 10 10 10 45 42 41 44 43 8 7 6 5 4 44 42 45 41 43 10 8 8 6 2 44 42 41 45 43 10 9 6 3 1 41 43 42 44 45 8 6 4 3 2 13 15 14 11 12 10 9 9 5 5 11 15 13 12 14 10 7 6 3 1 11 14 13 15 12 10 6 5 4 0 11 15 13 14 12 10 7 6 5 3 12 11 15 13 14 10 8 7 6 5 34 32 35 31 33 10 9 7 4 0 32 34 31 35 33 10 9 8 7 6 34 32 31 35 33 8 7 6 5 4 31 35 32 34 33 10 8 5 4 3 31 35 34 33 32 9 8 7 4 2 32 35 34 33 31 8 9 10 7 7 32 35 34 31 33 9 7 6 5 1 44 45 42 43 41 10 8 7 6 4 42 43 44 41 45 10 8 7 6 4 11 12 15 13 14 10 10 7 6 6 11 15 12 13 14 10 8 6 5 3 52 51 54 53 55 9 8 6 5 5 55 52 53 54 51 9 8 5 3 1 23 22 24 21 25 9 8 6 5 4 22 24 21 23 25 8 7 7 6 4 ; proc sort; by card; /* run a simple frequency table to verify we got roughly */ /* equal numbers of respondents to rate each block of cards */ proc freq; tables block rating; /* now merge the card attribute dataset with the card rating */ /* data by card ID */ data combo; merge farms respond; by card; proc sort; by rating; /* print first ten obs to check merge went ok */ proc print data=combo (obs=10); /* now regress ratings against farm attribute variables using */ /* first 54 x 5 = 270 observations from WILMAPCO sample */ /* inclusion of MEANRATE means we're really analyzing */ /* deviations of individual ratings from MEANRATE */ /* BLOCK dummies are included to test (and correct) for */ /* different blocks of farms getting different mean ratings */ /* We weight obs by normalized VARRATE since data from */ /* respondents who used the entire range of the rating scale */ /* have more information value that data from respondents who */ /* confined ratings to a small range or, in the worst case, */ /* gave all 5 farms identical ratings. */ proc reg data=combo (obs=270); model rating=farmed forest totcost adjoins frontage devpace ltviab income orchard livestck meanrate block1 block2 block3 block4; weight varrate; /* test same model on observations from class */ proc reg data=combo (firstobs=271); model rating=farmed forest totcost adjoins frontage devpace ltviab income orchard livestck meanrate block1 block2 block3 block4; weight varrate;