deltas: Function deltas

deltasR Documentation

Function deltas

Description

Calculates the difference in expression(R^2) that results from omitting a predictor for each predictor.

Usage

deltas(
  model,
  x = NULL,
  y = NULL,
  fun = mean,
  plot = T,
  main = "Fischer's Delta",
  xlab = "Predictor",
  ylab = expression(R^2),
  col = NULL,
  ...
)

Arguments

model

Any object that works as input for function predict.

x

data.frame with numeric vectors.

y

numeric vector.

fun

A function that specifies what a predictor should be replaced with to remove its influence. Defaults at mean.

plot

Logical value indicating whether to plot the barplot. Defaults zo T.

main

Character vector with one element containing the barplot's title. Defaults to "Fischer's Delta".

xlab

Character vector with one element containing the barplot's x-axis label. Defaults to "Predictor".

ylab

Character vector with one element containing the barplot's y-axis label. Defaults to "R^2".

col

Vector containing the color of bars. If NULL (default) colors are generated based on the rainbow-palette.

...

Additional graphical parameters for barplot.

Details

Calculates the difference in R^2 that results from omitting a predictor for each predictor as described by Fischer(2015).

References

Fischer (2015). How to determine the unique contributions of input-variables to the nonlinear regression function of a multilayer perceptron. Ecological Modelling, 309, 60-63.

Examples

data=data.frame(y=rnorm(100)+scale(1:100),x1=rnorm(100)+scale(1:100),x2=rnorm(100));
l=lm(y~.,data=data)
deltas(l,data[c("x1","x2")],data["y"])

AndreasFischer1985/quantqual documentation built on June 20, 2022, 4:55 p.m.