| walsh.cottonprice | R Documentation |
Acres and price of cotton 1910-1943
Description
Acres and price of cotton 1910-1943
Format
A data frame with 34 observations on the following 9 variables.
yearyear, numeric 1910-1943
acresacres of cototn (1000s)
cottonprice per pound (cents) in previous year
cottonseedprice per ton (dollars) in previous year
combinedcotton price/pound + 1.857 x cottonseed price/pound (cents)
indexprice index, 1911-1914=100
adjcottonadjusted cotton price per pound (cents) in previous year
adjcottonseedadjusted cottonseed price per ton (dollars) in previous year
adjcombinedadjusted combined price/pound (cents)
Details
The 'index' is a price index for all farm commodities.
Source
R.M. Walsh (1944). Response to Price in Production of Cotton and Cottonseed, Journal of Farm Economics, 26, 359-372. https://doi.org/10.2307/1232237
Examples
## Not run:
library(agridat)
data(walsh.cottonprice)
dat <- walsh.cottonprice
dat <- transform(dat, acres=acres/1000) # convert to million acres
percentchg <- function(x){ # percent change from previous to current
ix <- 2:(nrow(dat))
c(NA, (x[ix]-x[ix-1])/x[ix-1])
}
# Compare percent change in acres with percent change in previous price
# using constant dollars
dat <- transform(dat, chga = percentchg(acres), chgp = percentchg(adjcombined))
with(dat, cor(chga, chgp, use='pair')) # .501 correlation
libs(lattice)
xyplot(chga~chgp, dat, type=c('p','r'),
main="walsh.cottonprice",
xlab="Percent change in previous price", ylab="Percent change in acres")
## End(Not run)