grnn.margin: Derive the marginal effect of a predictor used in a GRNN

Description Usage Arguments Value See Also Examples

View source: R/grnn.margin.R

Description

The function grnn.margin derives the marginal effect of a predictor used in a GRNN by assuming mean values for the rest predictors

Usage

1
grnn.margin(net, i, plot = TRUE)

Arguments

net

The GRNN object generated by grnn.fit()

i

The ith predictor in the GRNN

plot

TRUE or FALSE to plot the marginal effect

Value

A plot of the marginal effect or a dataframe of the marginal effect

See Also

grnn.partial

Examples

1
2
3
4
5
data(iris, package = "datasets")
Y <- ifelse(iris[, 5] == "setosa", 1, 0)
X <- scale(iris[, 1:4])
gnet <- grnn.fit(x = X, y = Y)
grnn.margin(gnet, 1, plot = FALSE)

yager documentation built on Oct. 26, 2020, 1:06 a.m.

Related to grnn.margin in yager...