shape(x, ymat, infocrit = "CIC", flat = TRUE, dec = TRUE, jp = TRUE,
invee = TRUE, vee = TRUE, inc = TRUE, db = TRUE, nsim = 1e+3,
edf0 = NULL, get.edf0 = FALSE, random = FALSE, msg = TRUE)The "shape" routine chooses one of the shapes allowed by the user based on the minimum Bayes information criterion (BIC) or the cone information criterion (CIC). It also returns the information criterion (IC) values for shapes allowed by the user. Fitting method is constrained quadratic B-splines, number of knots depends on number of observations. The cone projection algorithm used in this routine is implemented by the R package coneproj.
See references cited in this section and the official manual (https://cran.r-project.org/package=coneproj) for the R package coneproj for more details.
Meyer, M. C. (2013a) Semi-parametric additive constrained regression. Journal of Nonparametric Statistics 25(3), 715.
Meyer, M. C. (2013b) A simple new algorithm for quadratic programming with applications in statistics. Communications in Statistics 42(5), 1126--1139.
Liao, X. and M. C. Meyer (2014) coneproj: An R package for the primal or dual cone projections with routines for constrained regression. Journal of Statistical Software 61(12), 1--22.
plotshape, edf0s # import the matrix of Landsat signals
data("ymat")
# define the predictor vector: the year 1985 to the year 2010
x <- 1985:2010
## Not run:
# # Example 1:
# # call the shape routine allowing a double jump shape using "BIC"
# ans <- shape(x, ymat, "BIC")
# plotshape(ans, ids = 1:6, both = TRUE, form = TRUE)
# ## End(Not run)
# Example 2:
# call the shape routine not allowing a double jump shape using "CIC"
ans <- shape(x, ymat, "CIC", db = FALSE)
plotshape(ans, ids = 1:6, both = TRUE, form = TRUE)
Run the code above in your browser using DataLab