neuralnet {gemR}R Documentation

Neural Network by Multilayer Perceptron

Description

Neural Network by Multilayer Perceptron

Usage

neuralnet(
  object,
  formula,
  factor = 1,
  hidden = c(2),
  linear.output = FALSE,
  ...
)

Arguments

object

Object of class GEM.

formula

A formula specifying the model to be fitted. If not provided, the response variable is taken from the GEM object.

factor

The factor to be used as response. If formula is provided, this is ignored.

hidden

Vector with numbers of neurons in the hidden layers.

linear.output

Logical. If TRUE the output layer is linear, otherwise it is logistic.

...

Additional arguments passed to neuralnet.

Value

A neuralnet object that can be inspected and plotted.

See Also

Analyses using GEM: elastic, pca, sca, neuralnet, pls. Confidence interval plots: confints. Convenience knock-in and knock-out of effects: knock.in.

Examples

data(candies, package = "HDANOVA")
gemC <- GEM(assessment ~ assessor*candy, data=candies)

# Neural network model
nn <- neuralnet(gemC, factor = "candy", hidden = c(2))
plot(nn, rep="best")

# Network weights (input and hidden layers)
nn$weights

[Package gemR version 1.2.1 Index]