{CaDENCE}R Documentation

GAM-style effects plots for interpreting CDEN models


GAM-style effects plots provide a graphical means of interpreting relationships between predictors and conditional pdf parameter values predicted by a CDEN. From Plate et al. (2000): The effect of the ith input variable at a particular input point Delta.i.x is the change in f resulting from changing X1 to x1 from b1 (the baseline value [...]) while keeping the other inputs constant. The effects are plotted as short line segments, centered at (x.i, Delta.i.x), where the slope of the segment is given by the partial derivative. Variables that strongly influence the function value have a large total vertical range of effects. Functions without interactions appear as possibly broken straight lines (linear functions) or curves (nonlinear functions). Interactions show up as vertical spread at a particular horizontal location, that is, a vertical scattering of segments. Interactions are present when the effect of a variable depends on the values of other variables.

Usage, fit, column, baseline = mean(x[,column]),
         additive.scale = FALSE, epsilon = 1e-5,
         seg.len = 0.02, seg.cols = "black", plot = TRUE,
         return.results = FALSE, ...)



matrix with number of rows equal to the number of samples and number of columns equal to the number of predictor variables.


element from list returned by


column of x for which effects plots should be returned.


value of x[,column] to be used as the baseline for calculation of predictor effects; defaults to mean(x[,column]).


if TRUE then predictor effects and partial derivatives are calculated before the inverse link functions for the distribution parameters are applied; if FALSE (the default) then values are calculated after the inverse link functions are applied.


step-size used in the finite difference calculation of the partial derivatives.


length of effects line segments expressed as a fraction of the range of x[,column].


colors of effects line segments.


if TRUE (the default) then an effects plots for each distribution parameter is produced.


if TRUE then values of effects and partial derivatives for each distribution parameter are returned.


further arguments to be passed to plot.


A list with elements:


a matrix of predictor effects.


a matrix of predictor partial derivatives.


Cannon, A.J. and I.G. McKendry, 2002. A graphical sensitivity analysis for interpreting statistical climate models: Application to Indian monsoon rainfall prediction by artificial neural networks and multiple linear regression models. International Journal of Climatology, 22:1687-1708.

Plate, T., J. Bert, J. Grace, and P. Band, 2000. Visualizing the function computed by a feedforward neural network. Neural Computation, 12(6): 1337-1354.

See Also, cadence.predict


    lnorm.distribution <- list(density.fcn = dlnorm,
                               parameters = c("meanlog", "sdlog"),
                               parameters.fixed = NULL,
                               output.fcns = c(identity, exp))
    x <- FraserSediment$x.1970.1976[c(TRUE, rep(FALSE, 24)),]
    y <- FraserSediment$y.1970.1976[c(TRUE, rep(FALSE, 24)),,drop=FALSE]
    fit.nlin <-, y, n.hidden = 2, n.trials = 1,
                            hidden.fcn = tanh, distribution =
                            lnorm.distribution, maxit.Nelder = 100,
                            trace.Nelder = 1, trace = 1)
    fit.lin <-, y, hidden.fcn = identity, n.trials = 1,
                           distribution = lnorm.distribution,
                           maxit.Nelder = 100, trace.Nelder = 1,
                           trace = 1), fit = fit.nlin[[1]], column = 1,
              main = "Nonlinear"), fit = fit.lin[[1]], column = 1,
              additive.scale = TRUE,
              main = "Linear (additive.scale = TRUE)")

[Package CaDENCE version 1.2.5 Index]