phcfM R package

phcfM is an R package for modelling anthropogenic deforestation. It
was initially developed to obtain REDD+ baseline scenarios of
deforestation for the programme holistique de conservation des forêts
à Madagascar
(from which the package was named after). It includes
two main functions:

  1. demography(), to model the population growth with time in a
    hierarchical Bayesian framework using population census data and
    Gaussian linear mixed models.
  2. deforestation(), to model the deforestation process in a
    hierarchical Bayesian framework using land-cover change data and
    Binomial logistic regression models with variable time-intervals
    between land-cover observations.

Code and manual

The last stable version of the phcfM R package (phcfM_1.2) is officially available for several operating systems (Unix, Windows and Mac OSX)  on the Comprehensive R Archive Network (CRAN).

The source code and manual for the testing version is available here:


A GRASS location (phcfM_SM) and two mapsets with geographical data
layers (PERMANENT and study_area_4) are available to illustrate the
use of the phcfM R package. Associated to the GRASS location, a
directory (./scripts) includes the data and the R/GRASS scripts used
for the demographic and deforestation models.

Related publications

Vieilledent G., Grinand C., Vaudry R. 2013. Forecasting deforestation and carbon emissions in tropical developing countries facing demographic expansion: a case study in Madagascar. Ecology and Evolution. 3:1702-1716. [doi: 10.1002/ece3.550] pdf / Supplementary materials pdf


Using satellite images, we observed the deforestation from July 1991 to November 2011 in the moist forest on the east coast of Madagascar.

Forecasts are shown for the Andapa project site in the moist forest of Madagascar. Patches of deforestation and carbon dioxide emissions are represented in orange for the period 2010– 2020 and in red for the period 2020–2030. The remaining forest in 2030 is represented in dark green. Carbon dioxide emissions correspond to the loss of the aboveground biomass due to deforestation and do not take into account the belowground biomass nor the soil carbon.

The exponential model was fitted on the population census data from the RGPH ("recensement général de la population et de l'habitat") done at the Firaisana level in 1993 combined with a more recent population census data done between 2004 and 2009 at the Fokontany level. On the left figure, the delimitation of the Firaisana (black lines) and Fokontanys (grey lines) covering our study areas (red lines) are represented on the map of Madagascar. On the right figure, the population evolution for each Firaisana is represented by two grey dots connected by a grey line. The mean exponential growth population model is represented by a plain black line. The mean population growth rate was estimated at 3.39%.yr−1 . The 95% confidence envelop including the Firaisana variability is represented with dashed black lines.


Ghislain Vieilledent
Campus de Baillarguet
TA C-105/D
34398 Montpellier cedex 5

Skype: ghislain.vieilledent
Email: ghislain(dot)vieilledent(at)cirad(dot)fr
WWW: http://ghislain.vieilledent.free.fr