Relative cotton yield for different soil potassium concentrations

Format

A data frame with 24 observations on the following 2 variables.

yield

Relative yield

potassium

Soil potassium, ppm

Details

Cate & Nelson used this data to determine the minimum optimal amount of soil potassium to achieve maximum yield.

Note, Fig 1 of Cate & Nelson does not match the data from Table 2. It sort of appears that points with high-concentrations of potassium were shifted left to a truncation point. Also, the calculations below do not quite match the results in Table 1. Perhaps the published data were rounded?

Source

Cate, R.B. and Nelson, L.A. (1971). A simple statistical procedure for partitioning soil test correlation data into two classes. Soil Science Society of America Journal, 35, 658--660. https://doi.org/10.2136/sssaj1971.03615995003500040048x

Examples

library(agridat) data(cate.potassium) dat <- cate.potassium names(dat) <- c('y','x') CateNelson <- function(dat){ dat <- dat[order(dat$x),] # Sort the data by x x <- dat$x y <- dat$y # Create a data.frame to store the results out <- data.frame(x=NA, mean1=NA, css1=NA, mean2=NA, css2=NA, r2=NA) css <- function(x) { var(x) * (length(x)-1) } tcss <- css(y) # Total corrected sum of squares for(i in 2:(length(y)-2)){ y1 <- y[1:i] y2 <- y[-(1:i)] out[i, 'x'] <- x[i] out[i, 'mean1'] <- mean(y1) out[i, 'mean2'] <- mean(y2) out[i, 'css1'] <- css1 <- css(y1) out[i, 'css2'] <- css2 <- css(y2) out[i, 'r2'] <- ( tcss - (css1+css2)) / tcss } return(out) } cn <- CateNelson(dat) ix <- which.max(cn$r2) with(dat, plot(y~x, ylim=c(0,110), xlab="Potassium", ylab="Yield"))
title("cate.potassium - Cate-Nelson analysis")
abline(v=dat$x[ix], col="skyblue")
abline(h=(dat$y[ix] + dat$y[ix+1])/2, col="skyblue")
# \dontrun{ # another approach with similar results # https://joe.org/joe/2013october/tt1.php libs("rcompanion") cateNelson(dat$x, dat$y, plotit=0)
#> .................... #> #> Critical x that maximize sum of squares: #> #> Critical.x.value Sum.of.squares #> 1 46.5 5374.217 #> ........................ #> #> Critical y that minimize errors: #> #> Critical.y.value Q.i Q.ii Q.iii Q.iv Q.model Q.err Cramer.V #> 1 82.40 0 15 1 8 23 1 0.9129 #> 2 65.65 2 16 0 6 22 2 0.8165 #> 3 74.90 1 15 1 7 22 2 0.8125 #> 4 85.55 0 14 2 8 22 2 0.8367 #> #> n = Number of observations #> CLx = Critical value of x #> SS = Sum of squares for that critical value of x #> CLy = Critical value of y #> Q = Number of observations which fall into quadrants I, II, III, IV #> Q.Model = Total observations which fall into the quadrants predicted by the model #> p.Model = Percent observations which fall into the quadrants predicted by the model #> Q.Error = Observations which do not fall into the quadrants predicted by the model #> p.Error = Percent observations which do not fall into the quadrants predicted by the model #> Fisher.p = p-value from Fisher exact test dividing data into these quadrants #> Cramer.V = Cramer's V statistic from dividing data into these quadrants #> #> Final model: #>
#> n CLx SS CLy Q.I Q.II Q.III Q.IV Q.Model p.Model Q.Error #> 1 24 46.5 5374.217 82.4 0 15 1 8 23 0.9583333 1 #> p.Error Fisher.p.value Cramer.V #> 1 0.04166667 1.223706e-05 0.9129
# }