Comprehensive information on Nitrogen Use Efficiency for cereal crop production, N use Efficiency

 

Research Methods in Agriculture

Regression

1. Regression with confidence Intervals
2. Difference Between Slope and Intercept Components
3. Surface Response Model
4. Linear-Plateau
5. Linear-Linear

Frequency Distribution in Excel

Regression Analysis with Confidence Intervals (point and line)

data one;
input red nir NDVI yield height;
cards;
.5 .6 .7 4000 32
.4 .7 .8 5000 39
.5 .8 .9 5500 41
.4 .5 .7 3500 30
.3 .5 .6 3400 29
.2 .4 .5 2200 25
.24 .45 .55 2400 28
.29 .46 .58 2600 29
proc reg data = one;
model yield=height/p clm;
output out = dog p = pyd l95m=l95m u95m=u95m;
proc gplot; plot pyd*height yield*height='x' l95m*height u95m*height/overlay;
run;

cli 95% confidence limits for an individual predicted value
clm 95% confidence limits for the expected value of the dependent variable (mean)

(if you use cli, get rid of all the "m's" on the end of the l95 and u95 values)

 

Program for Determining the Significance Between Slope and Intercept Components from 2 Independent Regressions

data one;
input exp rep x y;
if rep = 1 then intc_dif=0;
if rep = 2 then intc_dif=1;
slop_dif=intc_dif*x;
cards;
2 1 3.3 39
2 1 2.4 48
2 1 3.1 42
2 1 3.35 40
2 2 3 30
2 2 3.1 26
2 2 3.2 20
2 2 3.15 22

data two; set one;
proc sort; by rep;
proc reg;
model y = x intc_dif slop_dif;
run;
proc reg;
by rep;
model y=x;
run;

 

Surface Response Model
linear and quadratic relationships of x and y with z and a linear interaction term. 

Z = x x2 y y2 xy

data one;
red nir NDVI yield height;
cards;
.5 .6 .7 4000 32
.4 .7 .8 5000 39
.5 .8 .9 5500 41
.4 .5 .7 3500 30
.3 .5 .6 3400 29
.2 .4 .5 2200 25
.24 .45 .55 2400 28
.29 .46 .58 2600 29
proc rsreg data = one out = two;
  model NDVI = red nir /predict;
proc g3grid data = two out = three;
  grid red*nir=NDVI/spline;
proc g3d data = three gout=new;
  plot red*nir=NDVI;
run;

Stability Analysis (treatment by environment interactions)

Magruder excel file
Use of Stability Analysis for Long-Term Soil Fertility Experiments (pdf, Agron J. 85:159-167)
Stability Analysis (excel)

 

Cate-Nelson

Linear-Plateau Program

data one;
  input rep trt x  y;
cards;
proc nlin data = one best = 3;
parms b0=200 to 400 by 20 b1=-12 to -5 by 1 njoint=5 to 30 by 2;
            if x<njoint then do;
            model y = b0 + b1*x;
            der.b0=1;
            der.b1=x;
            der.njoint=0;
end;
            else do;
            model y=b0+b1*njoint;
            der.b0=1;
            der.b1=njoint;
            der.njoint=b1;
end;
            file print;
            if _obs_ =1 and _model_ =0 then do;
            plateau = b0 + b1*njoint;
            put plateau=;
end;
            plateau=b0+b1*njoint;
            id plateau;
            output out = new p = pry parms=b0 b1 njoint sse=sse;
run;

proc plot;
            plot y*x='+' pry*x='*'/overlay;
run;
proc means noprint;
            var y sse b0 b1 njoint plateau;
            output out = new2 n = tdf
            mean = y sse b0 b1 njoint plateau
            css=csst;
data new3; set new2;
            intercpt=b0; slope=b1; joint=njoint;
            rsq=(csst-sse)/csst;
            edf=tdf-3;
            ssr=csst-sse;
            msr=ssr/2;
            mse=sse/edf;
            f=msr/mse;
            probf=1-(probf(f,2,edf));

keep intercpt slope joint plateau rsq f probf;
proc print;
run;

 

Linear-Linear Program

data one;
  input rep trt x  y;
cards;
proc nlin data = one best = 2;
parms b0=50 to 100 by 10 b1=-0.5 to -0.1 by 0.01 joint=10 to 50 by 10
    b2 = -.5 to .1 by 0.05;
    if x<joint then do;
    model y = b0 + b1*x;
    der.b0=1;
    der.b1=x;
    der.joint=0;
    der.b2=0;
    end;
else do;
   model y=b0+(b1-b2)*joint+b2*x;
   der.b0=1;
   der.b1=joint; 
   der.joint=b1-b2;
   der.b2=x-joint; 

end;

file print;
            if _obs_ =1 and _model_ =0 then do;
            joinlev = b0 + b1*joint;
            put joinlev=;
end;

joinlev=b0+b1*joint; 
            id joinlev;
            output out = new p = pry parms=b0 b1 joint b2 sse=sse;

run;
            proc plot;
            plot y*x='+' pry*x='*'/overlay;

run;
proc means noprint;

var y sse b0 b1 joint b2 joinlev;
output out = new2 n = tdf
mean = y sse b0 b1 joint b2 joinlev
           css=csst;
data new3; set new2;
intercpt=b0; slope=b1; joint=joint; slope2=b2; jresp=joinlev;
rsq=(csst-sse)/csst;
edf=tdf-4;
ssr=csst-sse;
msrg=ssr/3;
mse=sse/edf;
f=msrg/mse;
probf=1-(probf(f,2,edf));
keep intercpt slope joint slope2 joinlev rsq msrg mse edf f probf;
proc print;
run;