Learn R Programming

agridat (version 1.8.1)

hessling.argentina: Relation between wheat yield and weather in Argentina

Description

Relation between wheat yield and weather in Argentina

Arguments

source

N. A. Hessling, 1922. Relations between the weather and the yield of wheat in the Argentine republic, Monthly Weather Review, 50, 302-308. http://dx.doi.org/10.1175/1520-0493(1922)50<302:rbtwat>2.0.CO;2

Details

In Argentina wheat is typically sown May to August. Harvest begins in November or December.

Examples

Run this code
dat <- hessling.argentina

# Fig 1 of Hessling.  Use avg Aug-Nov temp to predict yield
dat <- transform(dat, avetmp=(t08+t09+t10+t11)/4) # Avg temp
m0 <- lm(yield ~ avetmp, dat)
plot(yield~year, dat, ylim=c(200,1400), type='l',
main="Observed (black) and predicted yield (blue)")
lines(fitted(m0)~year, dat, col="blue")

# A modern, PLS approach
require(pls)
yld <- dat[,"yield",drop=FALSE]
yld <- as.matrix(sweep(yld, 2, colMeans(yld)))
cov <- dat[,c("p06","p07","p08","p09","p10","p11", "t08","t09","t10","t11")]
cov <- as.matrix(scale(cov))
m2 <- plsr(yld~cov)
biplot(m2, which="x", var.axes=TRUE)

Run the code above in your browser using DataLab