* This Stata DO file prepares for analysis the dataset from the mail survey called "Bioenergy and Land Use" sent to non-industrial private landowners in northern Michigan and northern Wisconsin in Oct. 2014. (See details in Codebook document.) * Input to program: Comma-delimited, cleaned dataset "NTierSurveydataentry-StataReady-ForArchive-SK.csv" * Output from program: Analysis-ready dataset, including: * 1) Generate binary variables for each of the 4 state-level strata: * 1= high cropland/grassland, MI * 2= low cropland/grassland, MI * 3= high cropland/grassland, WI * 4= low cropland/grassland, WI * 2) Generate survey weights using inverse sampling probabilty based on product of: * a) County_weight variables using state-level strata variables (above): * b) Owner_weight variables created from in-county strata (class) variables: ag10-100, agm100, forest10-100, forestm100 * 3) Generate rental rate and timber slash payments (both per acre) from contingent valuation experimental design of 16 questionnaire versions. /* N-tier Survey Data Cleaning File Majority is from cleaning file from Sophia Tanner's 28 August cleaning file with minor edits. */ *Change insheet command below to fit your own file name (depending on the directory in which it is saved) insheet using NTierSurveydataentry-StataReady-ForArchive-SK.csv set more off *Generating "income" land use categories gen ag_income=1 if a12_ag_ag_income==1|a12_ag_rec_income==1 replace ag_income=0 if ag_income==. order ag_income,before(a12_ag_ag_income) gen farm_income=1 if a12_farm_ag_income==1|a12_farm_rec_income==1 replace farm_income=0 if farm_income==. order farm_income,before(a12_farm_ag_income) gen forest_income=1 if a12_forest_ag_inc==1|a12_forest_rec_inc==1 replace forest_income=0 if forest_income==. order forest_income,before(a12_forest_ag_inc) *Generating cropland, noncrop, and forest land totals. mvdecode a9_corn a9_soy a9_wheat a9_other_row_crops a9_hay_rot a9_fruit a9_fallow a9_other_cropland a9_hay_cont a9_livestock_pasture a9_open_grass a9_shrub a9_other_noncrop a9_mx_forest a9_single_spec a9_other_forest a9_other_rural a9_other_other, mv(-99) egen acres_cropland=rowtotal(a9_corn a9_soy a9_wheat a9_other_row_crops a9_hay_rot a9_fruit a9_fallow a9_other_cropland) order acres_cropland,before(a9_corn) replace acres_cropland=. if a9_corn==.| a9_soy==.| a9_wheat==.| a9_other_row_crops==.| a9_hay_rot==.| a9_fruit==.| a9_fallow==.| a9_other_cropland==. egen acres_noncrop= rowtotal (a9_hay_cont a9_livestock_pasture a9_open_grass a9_shrub a9_other_noncrop) order acres_noncrop,before(a9_corn) replace acres_noncrop =. if a9_hay_cont==.| a9_livestock_pasture==.| a9_open_grass==.| a9_shrub==.| a9_other_noncrop==. egen acres_forest = rowtotal (a9_mx_forest a9_single_spec a9_other_forest) order acres_forest,before(a9_corn) replace acres_forest =. if a9_mx_forest ==.| a9_single_spec==.| a9_other_forest egen acres_other=rowtotal(a9_other_rural a9_other_other) order acres_other, before(a9_corn) replace acres_other=. if a9_other_rural==.| a9_other_other==. *Generating correct price for each survey gen version=substr(id, 1,2) order version,after(id) destring version, replace gen price_corn=15 gen price_switch=15 gen price_poplar=15 gen price_slash=15 order price_corn price_switch price_poplar price_slash, after(version) replace price_poplar=30 if version==2 replace price_slash=30 if version==2 replace price_poplar=60 if version==3 replace price_slash=60 if version==3 replace price_poplar=90 if version==4 replace price_slash=90 if version==4 replace price_corn=30 if version==5 replace price_switch=30 if version==5 replace price_corn=30 if version==6 replace price_switch=30 if version==6 replace price_poplar=30 if version==6 replace price_slash=30 if version==6 replace price_corn=30 if version==7 replace price_switch=30 if version==7 replace price_poplar=60 if version==7 replace price_slash=60 if version==7 replace price_corn=30 if version==8 replace price_switch=30 if version==8 replace price_poplar=90 if version==8 replace price_slash=90 if version==8 replace price_corn=60 if version==9 replace price_switch=60 if version==9 replace price_corn=60 if version==10 replace price_switch=60 if version==10 replace price_poplar=30 if version==10 replace price_slash=30 if version==10 replace price_corn=60 if version==11 replace price_switch=60 if version==11 replace price_poplar=60 if version==11 replace price_slash=60 if version==11 replace price_corn=60 if version==12 replace price_switch=60 if version==12 replace price_poplar=90 if version==12 replace price_slash=90 if version==12 replace price_corn=90 if version==13 replace price_switch=90 if version==13 replace price_corn=90 if version==14 replace price_switch=90 if version==14 replace price_poplar=30 if version==14 replace price_slash=30 if version==14 replace price_corn=90 if version==15 replace price_switch=90 if version==15 replace price_poplar=60 if version==15 replace price_slash=60 if version==15 replace price_corn=90 if version==16 replace price_switch=90 if version==16 replace price_poplar=90 if version==16 replace price_slash=90 if version==16 *Generating county variables rename county county_sampling gen county=a1_county tab county replace county="11" if county=="11,Marathon" replace county="12" if county=="12,Baraga" replace county="2" if county=="2,Presque Isle" replace county="3" if county=="3,Charlevoix"|county=="53" replace county="8" if county=="8,Charlevoix" destring county,replace force replace county=-100 if county==. order county,after(a1_county) mvdecode county, mv(-99) gen alger=1 if county==1 replace alger=0 if county>1|county<1 replace alger=. if county==. order alger,after(county) gen alpena=1 if county==2 replace alpena=0 if county>2|county<2 replace alpena=. if county==. order alpena,after(alger) gen antrim=1 if county==3 replace antrim=0 if county>3|county<3 replace antrim=. if county==. order antrim,after(alpena) gen bayfield=1 if county==4 replace bayfield=0 if county>4|county<4 replace bayfield=. if county==. order bayfield,after(antrim) gen clare=1 if county==5 replace clare=0 if county>5|county<5 replace clare=. if county==. order clare,after(bayfield) gen emmet=1 if county==6 replace emmet=0 if county>6|county<6 replace emmet=. if county==. order emmet,after(clare) gen florence=1 if county==7 replace florence=0 if county>7|county<7 replace florence=. if county==. order florence,after(emmet) gen gladwin=1 if county==8 replace gladwin=0 if county>8|county<8 replace gladwin=. if county==. order gladwin,after(emmet) gen grand_traverse=1 if county==9 replace grand_traverse=0 if county>9|county<9 replace grand_traverse=. if county==. order grand_traverse,after(gladwin) gen iosco=1 if county==10 replace iosco=0 if county>10|county<10 replace iosco=. if county==. order iosco,after(grand_traverse) gen lincoln=1 if county==11 replace lincoln=0 if county>11|county<11 replace lincoln=. if county==. order lincoln,after(iosco) gen marquette=1 if county==12 replace marquette=0 if county>12|county<12 replace marquette=. if county==. order marquette,after(lincoln) gen mason=1 if county==13 replace mason=0 if county>13|county<13 replace mason=. if county==. order mason,after(marquette) gen polk=1 if county==14 replace polk=0 if county>14|county<14 replace polk=. if county==. order polk,after(mason) gen portage=1 if county==15 replace portage=0 if county>15|county<15 replace portage=. if county==. order portage,after(polk) gen schoolcraft=1 if county==16 replace schoolcraft=0 if county>16|county<16 replace schoolcraft=. if county==. order schoolcraft,after(portage) gen shawano=1 if county==17 replace shawano=0 if county>17|county<17 replace shawano=. if county==. order shawano,after(schoolcraft) gen wexford=1 if county==18 replace wexford=0 if county<18 replace wexford=. if county==. order wexford,after(shawano) gen other_county=1 if county==-100 replace other_county=0 if county>-100 replace other_county=. if county==. order other_county,after(wexford) gen state_mi=1 if county==01 |county==02 | county==03|county==05 | county==06| county==08| county==09| county==10| county==12|county==13 | county==16|county==18 order state_mi, after(county) replace state_mi = 0 if state_mi==. replace state_mi=. if county==. tab a1_county replace state_mi=1 if a1_county=="Alcona"|a1_county=="Allegan"|a1_county=="Arenac"|a1_county=="Benzie"|a1_county=="Charlevoix"|a1_county=="Cheboygan"|a1_county=="Crawford"|a1_county=="Delta"|a1_county=="Dickinson"|a1_county=="Eaton"|a1_county=="Genesee"|a1_county=="Gogebic"|a1_county=="Grand Traverse"|a1_county=="Isabella"|a1_county=="Jackson"|a1_county=="Keweenaw"|a1_county=="Leelanau"|a1_county=="Luce"|a1_county=="Mackinac"|a1_county=="Mecosta"|a1_county=="Missaukee"|a1_county=="Oceana"|a1_county=="Osceola"|a1_county=="Presque Isle" *cg_high gen cg_high=0 replace cg_high=1 if county==02 | county==03|county==05 | county==08 | county==09|county==13|county==14|county==15|county==18 replace cg_high=. if county==. order cg_high,after(county) *Generating 0/1 conservation program variable mvdecode a10_crp a10_csp a10_eqip a10_mfl a10_cf a10_qf a10_other_prog, mv(-99) gen cons_program=0 order cons_program,before (a10_crp) replace cons_program=1 if a10_crp==1|a10_csp==1|a10_eqip==1|a10_mfl==1|a10_cf==1|a10_qf==1|a10_other_prog==1 replace cons_program=. if a10_crp==. & a10_csp==.& a10_eqip==.& a10_mfl==.& a10_cf==.&a10_qf==.& a10_other_prog==. *ALTERNATIVE: generate 0/1 forest program variable mvdecode a10_crp a10_csp a10_eqip a10_mfl a10_cf a10_qf a10_other_prog, mv(-99) gen forest_program=0 order forest_program,before (a10_crp) replace forest_program=1 if a10_mfl==1|a10_cf==1|a10_qf==1 replace forest_program=. if a10_mfl==.& a10_cf==.&a10_qf==. *generating 0/1 rental decisions replace c1a=1 if c1b>0 gen rent_crop_corn=1 if c1a==1 replace rent_crop_corn=0 if c1a>1|c1a==0 tab rent_crop_corn order rent_crop_corn,before(c1a) replace c2a=1 if c2b>0 gen rent_farm_corn=1 if c2a==1 replace rent_farm_corn=0 if c2a>1|c2a==0 tab rent_farm_corn order rent_farm_corn,before(c2a) replace c3a=1 if c3b>0 gen rent_forest_corn=1 if c3a==1 replace rent_forest_corn=0 if c3a>1|c3a==0 tab rent_forest_corn order rent_forest_corn,before(c3a) replace c4a=1 if c4b>0 gen rent_crop_switch=1 if c4a==1 replace rent_crop_switch=0 if c4a>1|c4a==0 tab rent_crop_switch order rent_crop_switch,before(c4a) replace c5a=1 if c5b>0 gen rent_farm_switch=1 if c5a==1 replace rent_farm_switch=0 if c5a>1|c5a==0 tab rent_farm_switch order rent_farm_switch,before(c5a) replace c6a=1 if c6b>0 gen rent_forest_switch=1 if c6a==1 replace rent_forest_switch=0 if c6a>1|c6a==0 tab rent_forest_switch order rent_forest_switch,before(c6a) replace c7a=1 if c7b>0 gen rent_crop_poplar=1 if c7a==1 replace rent_crop_poplar=0 if c7a>1|c7a==0 tab rent_crop_poplar order rent_crop_poplar,before(c7a) replace c8a=1 if c8b>0 gen rent_farm_poplar=1 if c8a==1 replace rent_farm_poplar=0 if c8a>1|c8a==0 tab rent_farm_poplar order rent_farm_poplar,before(c8a) replace c9a=1 if c9b>0 gen rent_forest_poplar=1 if c9a==1 replace rent_forest_poplar=0 if c9a>1|c9a==0 tab rent_forest_poplar order rent_forest_poplar,before(c9a) tab c10 replace c10=1 if c10==13 gen contract_harvest=1 if c10==1 replace contract_harvest=0 if c10>1|c10==0 tab contract_harvest order contract_harvest,before(c10) tab c11 replace c11=1 if c10==13 gen contract_standimp=1 if c11==1 replace contract_standimp=0 if c11>1|c11==0 tab contract_standimp order contract_standimp,before(c11) mvdecode _all, mv(-99) gen income=12.5 if e5==1 replace income=37.5 if e5==2 replace income=75 if e5==3 replace income=125 if e5==4 replace income=175 if e5==5 replace income=225 if e5==6 order income,before(e5) gen county_weight=. order county_weight,before(coder) replace county_weight=15/6 if county_sampling=="Grand Traverse"|county_sampling=="Gladwin"|county_sampling=="Mason"|county_sampling=="Antrim"|county_sampling=="Clare"|county_sampling=="Alpena" replace county_weight=31/6 if county_sampling=="Schoolcraft"|county_sampling=="Iosco"|county_sampling=="Wexford"|county_sampling=="Marquette"|county_sampling=="Alger"|county_sampling=="Emmet" replace county_weight=13/3 if county_sampling=="Polk"|county_sampling=="Portage"|county_sampling=="Shawano" replace county_weight=17/3 if county_sampling=="Bayfield"|county_sampling=="Florence"|county_sampling=="Lincoln" *1= high cropland/grassland, MI *2= low cropland/grassland, MI *3= high cropland/grassland, WI *4= low cropland/grassland, WI gen county_strata=1 if county_sampling=="Grand Traverse"|county_sampling=="Gladwin"|county_sampling=="Mason"|county_sampling=="Antrim"|county_sampling=="Clare"|county_sampling=="Alpena" replace county_strata=2 if county_sampling=="Schoolcraft"|county_sampling=="Iosco"|county_sampling=="Wexford"|county_sampling=="Marquette"|county_sampling=="Alger"|county_sampling=="Emmet" replace county_strata=3 if county_sampling=="Polk"|county_sampling=="Portage"|county_sampling=="Shawano" replace county_strata=4 if county_sampling=="Bayfield"|county_sampling=="Florence"|county_sampling=="Lincoln" gen owner_weight=. order owner_weight,before(coder) replace owner_weight=61/24 if county_sampling=="Alger" & class=="" replace owner_weight=28/24 if county_sampling=="Alger" & class=="agm100" replace owner_weight=44/24 if county_sampling=="Alger" & class=="forest10-100" replace owner_weight=24/24 if county_sampling=="Alger" & class=="forestm100" replace owner_weight=751/37 if county_sampling=="Alpena" & class=="ag10-100" replace owner_weight=222/25 if county_sampling=="Alpena" & class=="agm100" replace owner_weight=11/11 if county_sampling=="Alpena" & class=="forest10-100" replace owner_weight=23/23 if county_sampling=="Alpena" & class=="forestm100" replace owner_weight=160/25 if county_sampling=="Antrim" & class=="ag10-100" replace owner_weight=45/37 if county_sampling=="Antrim" & class=="agm100" replace owner_weight=24/23 if county_sampling=="Antrim" & class=="forest10-100" replace owner_weight=11/11 if county_sampling=="Antrim" & class=="forestm100" replace owner_weight=422/38 if county_sampling=="Clare" & class=="ag10-100" replace owner_weight=151/43 if county_sampling=="Clare" & class=="agm100" replace owner_weight=10/10 if county_sampling=="Clare" & class=="forest10-100" replace owner_weight=5/5 if county_sampling=="Clare" & class=="forestm100" replace owner_weight=224/33 if county_sampling=="Emmet" & class=="ag10-100" replace owner_weight=95/42 if county_sampling=="Emmet" & class=="agm100" replace owner_weight=16/13 if county_sampling=="Emmet" & class=="forest10-100" replace owner_weight=8/8 if county_sampling=="Emmet" & class=="forestm100" replace owner_weight=622/43 if county_sampling=="Gladwin" & class=="ag10-100" replace owner_weight=199/48 if county_sampling=="Gladwin" & class=="agm100" replace owner_weight=5/5 if county_sampling=="Gladwin" & class=="forest10-100" replace owner_weight=331/26 if county_sampling=="Grand Traverse" & class=="ag10-100" replace owner_weight=117/42 if county_sampling=="Grand Traverse" & class=="agm100" replace owner_weight=22/22 if county_sampling=="Grand Traverse" & class=="forest10-100" replace owner_weight=6/6 if county_sampling=="Grand Traverse" & class=="forestm100" replace owner_weight=327/45 if county_sampling=="Iosco" & class=="ag10-100" replace owner_weight=174/41 if county_sampling=="Iosco" & class=="agm100" replace owner_weight=3/3 if county_sampling=="Iosco" & class=="forest10-100" replace owner_weight=7/7 if county_sampling=="Iosco" & class=="forestm100" replace owner_weight=55/24 if county_sampling=="Marquette" & class=="ag10-100" replace owner_weight=33/24 if county_sampling=="Marquette" & class=="agm100" replace owner_weight=562/24 if county_sampling=="Marquette" & class=="forest10-100" replace owner_weight=144/24 if county_sampling=="Marquette" & class=="forestm100" replace owner_weight=265/24 if county_sampling=="Mason" & class=="ag10-100" replace owner_weight=155/39 if county_sampling=="Mason" & class=="agm100" replace owner_weight=25/24 if county_sampling=="Mason" & class=="forest10-100" replace owner_weight=9/9 if county_sampling=="Mason" & class=="forestm100" replace owner_weight=63/24 if county_sampling=="Schoolcraft" & class=="ag10-100" replace owner_weight=26/24 if county_sampling=="Schoolcraft" & class=="agm100" replace owner_weight=111/24 if county_sampling=="Schoolcraft" & class=="forest10-100" replace owner_weight=58/24 if county_sampling=="Schoolcraft" & class=="forestm100" replace owner_weight=266/24 if county_sampling=="Wexford" & class=="ag10-100" replace owner_weight=74/34 if county_sampling=="Wexford" & class=="agm100" replace owner_weight=101/24 if county_sampling=="Wexford" & class=="forest10-100" replace owner_weight=14/14 if county_sampling=="Wexford" & class=="forestm100" replace owner_weight=2499/48 if county_sampling=="Bayfield" & class=="ag10-100" replace owner_weight=573/48 if county_sampling=="Bayfield" & class=="agm100" replace owner_weight=345/48 if county_sampling=="Bayfield" & class=="forest10-100" replace owner_weight=138/48 if county_sampling=="Bayfield" & class=="forestm100" replace owner_weight=1236/48 if county_sampling=="Florence" & class=="ag10-100" replace owner_weight=48/48 if county_sampling=="Florence" & class=="agm100" replace owner_weight=248/48 if county_sampling=="Florence" & class=="forest10-100" replace owner_weight=89/48 if county_sampling=="Florence" & class=="forestm100" replace owner_weight=354/48 if county_sampling=="Lincoln" & class=="ag10-100" replace owner_weight=105/48 if county_sampling=="Lincoln" & class=="agm100" replace owner_weight=268/48 if county_sampling=="Lincoln" & class=="forest10-100" replace owner_weight=89/48 if county_sampling=="Lincoln" & class=="forestm100" replace owner_weight=2914/48 if county_sampling=="Polk" & class=="ag10-100" replace owner_weight=785/48 if county_sampling=="Polk" & class=="agm100" replace owner_weight=331/48 if county_sampling=="Polk" & class=="forest10-100" replace owner_weight=120/48 if county_sampling=="Polk" & class=="forestm100" replace owner_weight=3392/48 if county_sampling=="Portage" & class=="ag10-100" replace owner_weight=774/48 if county_sampling=="Portage" & class=="agm100" replace owner_weight=530/48 if county_sampling=="Portage" & class=="forest10-100" replace owner_weight=102/48 if county_sampling=="Portage" & class=="forestm100" replace owner_weight=2516/48 if county_sampling=="Shawano" & class=="ag10-100" replace owner_weight=583/67 if county_sampling=="Shawano" & class=="agm100" replace owner_weight=258/48 if county_sampling=="Shawano" & class=="forest10-100" replace owner_weight=29/29 if county_sampling=="Shawano" & class=="forestm100" gen weight=county_weight*owner_weight order weight,before(coder) /* Majority of Elena Dulys changes begin. */ rename a8 prev_harv replace a8a="2005" if a8a=="10+ years ago" | a8a=="10+ yrs" | a8a=="10-12" replace a8a="1975" if a8a=="1970's" replace a8a="1985" if a8a=="1980's" replace a8a="1980" if a8a=="1980+-" | a8a=="1980?" | a8a=="~1980" replace a8a="1984" if a8a=="1984?" replace a8a="1995" if a8a=="1990's" | a8a=="over 20 years ago" replace a8a="1990" if a8a=="1990?" replace a8a="1991" if a8a=="1991?" replace a8a="1995" if a8a=="1995?" | a8a=="appx. 1995 (father owned)" replace a8a="1997" if a8a=="1996-1997" replace a8a="1996" if a8a=="1996?" replace a8a="1999" if a8a=="199?" replace a8a="2000" if a8a=="15" replace a8a="2002" if a8a=="2001/2002" replace a8a="2003" if a8a=="2002-2003 apprx" | a8a=="2003?" replace a8a="2004" if a8a=="2004?" | a8a=="prior to 2004" replace a8a="2005" if a8a=="2005+-" | a8a=="2005?" | a8a=="10" replace a8a="2006" if a8a=="2005-2006" replace a8a="2008" if a8a=="2008?" replace a8a="2010" if a8a=="2009 or 2010" | a8a=="approx 2010" replace a8a="2009" if a8a=="2009?" replace a8a="2011" if a8a=="2010 or 2011" | a8a=="2011?" replace a8a="2012" if a8a=="2011 or 2012" | a8a=="2011-2012" replace a8a="2013" if a8a=="2012/2013" replace a8a="2014" if a8a=="2013-2014" | a8a==" 2013/14" | a8a=="spring 2014" replace a8a="2015" if a8a=="2014-15" | a8a=="contract through 2015" | a8a=="harvest will take place in 2015" | a8a=="2000 (will harvest again in 2015)" | a8a=="2004, hopefully 2015" | a8a=="currently being harvested" replace a8a="1985" if a8a=="30 y" replace a8a="1975" if a8a=="40" replace a8a="2009" if a8a=="6 or 7" replace a8a="2008" if a8a=="8 years ago?" replace a8a="1998" if a8a=="98ish" replace a8a="1996" if a8a=="19 don't know" destring a8a, replace force replace a8a=. if a8a==-100 | a8a==-99 gen yr_last_harv = 2015 - a8a rename a9_mx_forest mix_forest_acres gen mix_forest_acres2 = mix_forest_acres^2 rename a9_single_spec single_spec_acres rename a9_other_forest other_forest_acres rename a10_crp crp rename a10_csp csp rename a10_eqip eqip rename a10_mfl mfl rename a10_cf cfp rename a10_qf qf rename a10_other_prog other_prog gen forest_prog=0 replace forest_prog=1 if crp==1 | csp==1 | eqip==1 | mfl==1 | cfp==1 | qf==1 | other_prog==1 rename a12_forest_ag_income forest_ag_income rename a12_forest_rec_income forest_rec_income rename a12_forest_personal forest_personal rename a12_forest_other forest_other rename a13 cons_ease rename a14 reserve rename a15 for_mgt_plan replace a16=. if a16==-100 rename a16 livestock replace a17=. if a17<0 | a17>3 gen old_mix=0 replace old_mix=1 if a17==3 replace a18=. if a18<0 gen old_sing=0 replace old_sing=1 if a18==3 replace a19b=. if a19b==2 rename a19b rent_forest replace a19c=. if a19c==12 | a19c==2 rename a19c family_no replace a19d=. if a19d==10 | a19d==2 rename a19d sell replace a19e=. if a19e==2 rename a19e sell_rec replace a19f=. if a19f==2 rename a19f sell_dev replace a19g=. if a19g==12 | a19g==20 | a19g==2 rename a19g never_sell replace a19h=. if a19h==10 | a19h==12 | a19h==2 rename a19h will_sell replace a19i=. if a19i==-100 | a19i==12 | a19i==20 | a19i==2 rename a19i family_sell replace a19j=. if a19j==2 rename a19j subdivide replace a19k=. if a19k==10 | a19k==12 | a19k==2 rename a19k reforest replace a19l=. if a19l==20 rename a19l other_use replace other_use=. if other_use==2 replace a19m=. if a19m==12 | a19m==20 rename a19m was_crop replace a19n=. if a19n==2 rename a19n was_grassland rename b1 bioenergy rename b2 cell_ethanol rename b3a corn_res_ethanol rename b3b switch_ethanol rename b3c poplar_ethanol replace b3d=. if b3d==10 rename b3d slash_ethanol rename b4a seen_corn rename b4b seen_switch rename b4c seen_poplar replace b4d=. if b4d==10 rename b4d seen_slash replace d1a=. if d1a==4.5 rename d1a renewable_belief replace d1b=. if d1b==2.5 rename d1b bioenergy_belief replace d1c=. if d1c==2.5 rename d1c no_coal_belief replace d1d=. if d1d==2.5 rename d1d climate_change_belief replace d1e=. if d1e==4.5 rename d1e food_issue_belief replace d1f=. if d1f==3.5 rename d1f forest_loss_belief replace d1g=. if d1g==1.5 | d1g==3.5 rename d1g public_for_belief replace d1h=. if d1h==3.5 rename d1h biodiversity rename d1i biofuels_belief replace d1j=. if d1j==3.5 rename d1j fossil_harm_belief replace d1k=. if d1k==1.5 | d1k==2.5 | d1k==3.5 rename d1k fossil_limit_belief replace d2a=. if d2a==1.5 rename d2a smell rename d2b noise rename d2c costs replace d2d=. if d2d==3.5 rename d2d contract_length replace d2e=. if d2e==2.5 rename d2e insurance replace d2f=. if d2f==2.5 | d2f==3.5 rename d2f privacy rename d2g change rename d2h profit rename d2i questions replace d2j=. if d2j==4.5 rename d2j chemicals rename d2k loss_biodiversity_concern rename d2l loss_soil_concern rename e1 age gen age2 = age^2 rename e2 male replace male=. if male>1 replace e4=. if e4==10 rename e4 farmer replace e5=. if e5==3.5 | e5==12 replace e5=25000 if e5==1 | e5==2 replace e5=75000 if e5==3 replace e5=125000 if e5==4 replace e5=175000 if e5==5 replace e5=225000 if e5==6 rename e5 hh_income gen hh_income2 = hh_income^2 replace e6=. if e6<1 | e6>6 replace e6=6 if e6==1 replace e6=12 if e6==2 replace e6=14 if e6==3 replace e6=16 if e6==4 replace e6=17 if e6==5 replace e6=20 if e6==6 rename e6 education *recode just college replace education=0 if education <16 replace education=1 if education>=16 rename e7_ag ag_zone rename e7_res residential rename e7_ind industrial rename e7_for forest rename e7_not unrestricted rename e7_unc idk rename e8 duration gen duration2 = duration^2 replace e9=. if e9==-100 rename e9 family_land rename e10 resident replace e10a="1.5" if e10a=="1 to 2" replace e10a="17.5" if e10a=="15-20" replace e10a="2.5" if e10a=="2 or 3" | e10a=="2 to 3" replace e10a="2" if e10a=="2 weeks to hunt and weekends" replace e10a="25" if e10a=="20-30" replace e10a="24" if e10a=="24+-" replace e10a="16.5" if e10a=="3 to 30" | e10a=="3-4" replace e10a="32" if e10a=="32+-" replace e10a="8" if e10a=="8 weeks, 48 weekends" replace e10a="52" if e10a=="year" | e10a=="all" | e10a=="all year" replace e10a="26" if e10a=="half of all weekends" destring e10a, replace force replace e10a=52 if e10a>52 replace e10a=. if e10a==-100 | e10a==-99 rename e10a weeks_home destring e11, replace force rename e11 zip_code rename e12_forest for_rent_rate destring for_rent_rate, replace force replace for_rent_rate=. if for_rent_rate<0 * create variable lists to group them by gen harvests = prev_harv*yr_last_harv gen residency = resident*weeks_home gen single_spec_acres2 = single_spec_acres^2 replace c10=. if c10 >4 replace c11=. if c11>4 * cull out those that shouldn't have answered the questions. drop if acres_forest==0 *change class variable to better name rename class class_strata * SAVE DATASET, then do each regression file with that saved data set (no changes after) ****************************************************************