R package ShapeSelectForest

Introduction

The package ShapeSelectForest is specially designed for Landsat time series of forest dynamics, and we develop it in the North American Dynamics Project with Forest Inventory & Analysis (FIA) scientists.

By constrained quadratic B-splines, this package delivers an optimal shape-restricted trajectory to a time series of Landsat imagery for the purpose of modeling annual forest disturbance dynamics to behave in an ecologically sensible manner assuming one of seven possible "shapes", namely, flat, decreasing, one-jump (decreasing, jump up, decreasing), inverted vee (increasing then decreasing), vee (decreasing then increasing), linear increasing, and double-jump (decreasing, jump up, decreasing, jump up, decreasing).


The main routine selects the best shape according to the minimum Bayes information criterion (BIC) or the cone information criterion (CIC), which is defined as the log of the estimated predictive squared error. (See references in the official manual for more details about CIC.)

Basic usage

This package depends on packages coneproj, raster and rgdal. The user could install the latest version in R as

R> install.packages("ShapeSelectForest")
R> library("ShapeSelectForest")

A data set of trajectories of Landsat signals from 36 pixels in South Carolina is included in this package and we present it as an example of the main routine shape and the graphical routine plotpersp here.

First, we load the matrix storingĀ  trajectories of Landsat signals and define the predictor vector as years 1985 to 2010.

R> data("ymat")
R> x <- 1985:2010

Next, we make a fit by the main routine shape and choose the best shape according to
the Cone Information Criterion (CIC).

R> ans <- shape(x, ymat, "CIC")

We can make a plot for the 1st column of ymat by the graphical routine plotshape.

R> plotshape(ans, ids = 1)




The best shape for the 1st column of ymat is "one-jump", which has the smallest CIC value.

Official Manual



Publication

A paper about application of this package is published in Global Change Biology and it is available at http://onlinelibrary.wiley.com/doi/10.1111/gcb.13358/full.

BugsReport


Please report any bug with an example to the maintainer's email address liaoxiyue2011@gmail.com.
Comments