PROC IMPORT OUT= WORK.First DATAFILE= "C:\Documents and Settings\jbever\My Documents\Gen omics Metacyt\Drought Data dec 10th 2009-1.xls" DBMS=EXCEL REPLACE; SHEET="Sheet1$"; GETNAMES=YES; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; *weedy weedy2 weedy3 Population Mom Soil Drought PlantNumber leafnum11 ht11 leafl11 leafw11 stemdi11 ht21 stemdi21 leafnum21 leafl21 leafw21 flnum21 brnum21 wilt31 leafnum31 degree31 bent31 ht31 deadleaf31 deadleaf41 wilt41 leafnum41 deadleaf42 wilt42 leafnum42 degree42 bent42 ht42 flnum42 deadleaf43 damleaf43 degree43 bent43 ht43 soil42 deadleaf51 leafnum51 flnum51 deadleaf52 wilt52 deadleaf53 wilt53 soil53 deadleaf54 damleaf54 ht61 deadleaf62 wilt62 deadleaf63 wilt63 deadleaf64 wilt64 degree64 bent64 ht64 deadleaf65 wilt65 degree65 bent65 ht65 deadleaf66 wilt66 degree66 bent66 ht66 deadleaf67 wilt67 degree67 bent67 ht67 deadleaf68 wilt68 degree68 bent68 ht68 degree69 bent69 ht69 soil68 deadleaf611 damleaf611 deadleaf73 damleaf73 leafnum73 ht73 flopen73 flnum73 ht75 flopen75 flnum75 leafnum75 deadleaf78 wilt78 degree78 bent78 ht78 leafnum78 stemdi711 deadleaf712 damleaf712 leafnum712 flnum88 flopen88 fldi188 fldi288 fldi388 fldi488 fldi588 fldi688 fldi788 fldi888 fldi988 deadleaf818 damleaf818 leafnum818 green818 ht93 dead93 green93 ht96 deadleaf96 leafnum96 brnum96 brnum97 shootwt flwt1 flwt2 flwt3 flwt4 flwt5 flwt6 flwt7 flwt8 flwt9 flwt10; data first; set first; if weedy = "x" then delete; totflowt = flwt1 +flwt2 +flwt3+ flwt4+flwt5 +flwt6 +flwt7+ flwt8+ flwt9 +flwt10; ltotflowt = log (1+totflowt); avflowt = totflowt/flnum88; lshootwt = log(1+shootwt); totwt = shootwt+totflowt; ltotwt =log(1+totwt); relflow = totflowt/totwt; *if stemdi21 < 1 then delete; leafsiz2 = sqrt(leafl21*leafw21); *If drought = "DROUGHT" then delete; prwilt4 =0; if wilt42>0 then prwilt4=wilt42/leafnum42; propwilt3= wilt31/leafnum31; If propwilt3 = "." then propwilt3 = 0; deaddam4=deadleaf43+damleaf43; prodeaddam4 = deaddam4/leafnum42; propdead4 = deadleaf43/leafnum42; leafnum5=leafnum42-deadleaf43; prwilt5 = wilt53/leafnum5; prdeaddam5 = (deadleaf54+damleaf54)/leafnum5; prdead5 = (deadleaf54)/leafnum42; prdead611 = deadleaf611/leafnum75; growthht75= (ht75 -ht61)/ht61; deaddam6 = deadleaf611 +damleaf611; propdeaddam6 = deaddam6/leafnum75; liveleaf68 = (leafnum75-deadleaf68); propwilt66 = wilt66/(leafnum75-deadleaf68); propdead78 = deadleaf78/leafnum78; liveleaf78 = leafnum78-deadleaf78; propwilt78 = wilt78/liveleaf78; proflop73 = flopen73/flnum73; proflop75 = flopen75/flnum75; propdeaddam712=(deadleaf712 +damleaf712)/leafnum712; growstem711 = (stemdi711-stemdi21)/stemdi21; lgrowstem711 = log(1 + growstem711); propflopen88= flopen88/flnum88; totfldiam88 = fldi188+ fldi288+ fldi388+ fldi488+ fldi588+ fldi688+ fldi788+ fldi888 +fldi988; deaddam818 = deadleaf818+damleaf818; prodeaddam818= deaddam818/leafnum818; propdead818 = deadleaf818/leafnum818; brnum9=0; If drought = "DROUGHT" then brnum9 = brnum97; If drought = "CONTROL" then brnum9 = brnum96; If drought = "CONTROL" then delete; proc sort; by drought; proc rank; var totflowt; /* PROC mixed covtest; CLASS block Soil Drought weedy3 Population Mom ; MODEL relflow = block weedy3 Soil Drought weedy3*soil weedy3*drought soil*drought weedy3*soil*drought /s OUTP=predicted ; contrast "domest vs others (native + av weed)" weedy3 2 2 -2 -1 -1; contrast "domest vs others (native + av weed)*soil" weedy3*soil 2 2 -2 -1 -1 -2 -2 2 1 1; contrast "domest vs others (native + av weed)*drought" weedy3*drought 2 2 -2 -1 -1 -2 -2 2 1 1; contrast "domest vs others (native + av weed)*drought*soil" weedy3*drought*soil 2 2 -2 -1 -1 -2 -2 2 1 1 -2 -2 2 1 1 2 2 -2 -1 -1 ; contrast "Improved vs land race" weedy3 1 -1 0 0 0; contrast "Improved vs land race*soil" weedy3*soil 1 -1 0 0 0 -1 1 0 0 0; contrast "Improved vs land race*drought" weedy3*drought 1 -1 0 0 0 -1 1 0 0 0; contrast "Improved vs land race*drought*soil" weedy3*drought*soil 1 -1 0 0 0 -1 1 0 0 0 -1 1 0 0 0 1 -1 0 0 0 ; contrast "native vs average weed growth rate" weedy3 0 0 2 -1 -1; contrast "native vs average weed*soil" weedy3*soil 0 0 2 -1 -1 0 0 -2 1 1; contrast "native vs average weed*drought" weedy3*drought 0 0 2 -1 -1 0 0 -2 1 1; contrast "native vs average weed*soil*drought" weedy3*soil*drought 0 0 2 -1 -1 0 0 -2 1 1 0 0 -2 1 1 0 0 2 -1 -1 ; contrast "NA weed vs Aus weed " weedy3 0 0 0 1 -1; contrast "NA weed vs Aus weed*soil" weedy3*soil 0 0 0 1 -1 0 0 0 -1 1; contrast "NA weed vs Aus weed*drought" weedy3*drought 0 0 0 1 -1 0 0 0 -1 1; contrast "NA weed vs Aus weed*soil*drought" weedy3*soil*drought 0 0 0 1 -1 0 0 0 -1 1 0 0 0 -1 1 0 0 0 1 -1 0 0 0 -1 1; random weedy3*population weedy3*soil*population weedy3*drought*population weedy3*soil*drought*population / s ; lsmeans weedy3 Soil Drought weedy3*soil weedy3*drought soil*drought weedy3*soil*drought; */ PROC mixed covtest; CLASS block Soil weedy3 Population Mom ; by drought; MODEL degree42 = block leafnum42 stemdi21 leafsiz2 weedy3 Soil weedy3*soil /s OUTP=predicted ; contrast "domest vs others (native + av weed)" weedy3 2 2 -2 -1 -1; contrast "domest vs others (native + av weed)*soil" weedy3*soil 2 2 -2 -1 -1 -2 -2 2 1 1; contrast "Improved vs land race" weedy3 1 -1 0 0 0; contrast "Improved vs land race*soil" weedy3*soil 1 -1 0 0 0 -1 1 0 0 0; contrast "native vs average weed growth rate" weedy3 0 0 2 -1 -1; contrast "native vs average weed*soil" weedy3*soil 0 0 2 -1 -1 0 0 -2 1 1; contrast "NA weed vs Aus weed " weedy3 0 0 0 1 -1; contrast "NA weed vs Aus weed*soil" weedy3*soil 0 0 0 1 -1 0 0 0 -1 1; random weedy3*population weedy3*soil*population / s ; lsmeans weedy3 Soil weedy3*soil ; /* proc sort; by weedy3 population drought soil; Proc Summary mean; by weedy3 population ; var pred stderrpred; output out=blup mean = relflowbpred bstderr; run; proc print; run; proc glm; class weedy3 population ; model relflowbpred = weedy3 /ss3; output out=four residuals=relflowbpredresid; proc print; PROC EXPORT DATA= WORK.Four OUTFILE= "C:\Documents and Settings\jbever\My Documents\Geno mics Metacyt\drought relflow resids and blups.xls" DBMS=EXCEL REPLACE; SHEET="sheet 1"; RUN; run; PROC mixed covtest; CLASS block weedy Population Mom Soil ; MODEL prwilt4 = block leafnum42 stemdi21 weedy Soil weedy*soil ; contrast "linear weedy*soil" weedy*soil 1 -1 -1 1 0 0; random weedy*population weedy*soil*population ; lsmeans weedy Soil weedy*soil ; */ /*PROC mixed covtest; CLASS block weedy Population Mom Soil ; MODEL brnum9 = block leafl11 stemdi11 weedy Soil weedy*soil ; contrast "linear weedy*soil" weedy*soil 1 -1 -1 1 0 0; random weedy*population weedy*soil*population ; lsmeans weedy Soil weedy*soil ;*/ run;