SAS Programs |
||
Introduction to SAS (SAS for Beginners) (SAS Beginners, Univ. Georgia) | ||
I.
Regression Analysis Several Programs including Linear Plateau, Surface Response, etc. Split Plot in Space (using depth as the non-random split) Contrast Coefficients (equally spaced) Contrast coefficients (un equally spaced) (PROC IML) Stability Analysis Long Term Experiment Design and Analysis Lahoma 502 Data Base Lahoma 502 Plot Plan Lahoma 502 (NH4 and NO3 by depth) (lah50288.sas) Soil-Plant Buffering of Inorganic Nitrogen in Continuous Winter Wheat. Agron J 1995 87: 827–834 Linear Plateau, and Plateau Linear options linesize = max pagesize = max; (data lines very long)
Plot Plan
title 'RCBD 5 reps, 7 treatments 2 Beds';
title 'CRD, 4 trts, 3
reps'; Output MEANS to a NEW DATA SET 1. proc sort; by seedwt drum;
seedwt = seed weight 2. proc sort; by yr trt; #1 Output Sum of Rain (added variable) and Temp (averaged value) by Month and Year and THEN Merged (rain and temp) by Month and Year data one; data two; set one; #2 Output Sum of Rain (added variable) and Temp (averaged value) by Month and Year and THEN Merged (rain and temp) by Month and Year proc summary data=one nway; data two; set one; data three; set nrain; proc sort; by yr month;
FOR generating output that was within GLM (MSE, etc.) 3. data two; set one;
Testing for a Normal Distribution (2011, 502 data, GN, buac, NDVI) data one; Delete Function |
||
Transpose
Function, OUTPUT DATA (2 examples) data one; input YR TRT BUAC; cards; 1893 1 10.5 1893 2 10.5 1894 1 20.9 1894 2 20.9 data two; set one; if trt <3 then delete; if trt >4 then delete; data three; set two; proc sort; by yr trt; proc means noprint; by yr trt; var buac; output out = new mean = ybuac; data new1; set new; proc sort; by yr; proc transpose data = new1 out = three prefix = trt; by yr; id trt; var ybuac; proc print; run;
Procedure for Determining Differences in Population
Means COMPOSITE PROGRAM SIMPLE STATISTICS A. Proc Corr (r values) (see added proc procedures that go with this data set)data one; proc corr (only certain variables) proc corr; /* r versus R (simple regression versus multiple regression) */ proc glm; /*R2 (percent of the variability in y explained by x) Proc Plot; plot buac*ndvi = "*"; run; B. coefficient of determination (r2), correlation coefficient (r) simple regression proc glm; model buac = ndvi; run; C. r versus R (simple regression versus multiple regression) proc glm; model buac = ndvi ph sn; run; coefficient of multiple determination (R2), and R, two x, and one y R2 (percent of the variability in y explained by x) Applied Procedures Proc Plot (proc plot; plot y * x = "*"; Proc Means (var statement) Proc corr (var statement) RCBD vs CRD Contrasts (orthogonal contrast coefficients) Contrasts for Unequal Treatment Spacing
Proc Mixed Example Using 502 Data (PPT file, WEB analysis of Proc Mixed) REP Nested within
YEAR (same site/over years) FOLIAR UAN in Corn: NDVI to detect damage differences data four; set one; proc sort; by year rep trt; data six; merge four five; by year rep trt; |