Umbrella facilitates access and extraction of CHIRPS rainfall data and fitting of seasonal profiles.
The package leans heavily on data and functionality from:
CHIRPS: Please see the CHIRPS website for more information, usage rights and citation infromation.
Installation
Please install from GitHub with:
# install.packages("devtools")
devtools::install_github("mrc-ide/umbrella")
We estimate the fourier series representing general seasonal profiles given rainfall in a setting using the following equation
where g0
, g1
, g2
, g3
, h1
, h2
, h3
are fitted parameters. This equation can be fitted as a linear model using Rs lm
function.
However, we impose an additional constraint when fitting: the rainfall floor. This sets a minimum lower bound on the value of rainfall. With this constraint we fit the resulting model with the optim()
function.