Learn R Programming

Numero (version 1.4.1)

numero.evaluate: Self-organizing map statistics

Description

Evaluate regional variation of data values on a self-organizing map

Usage

numero.evaluate(model, data, logarithm = NULL, n = 1000)

Arguments

model

A list object that contains a self-organizing map and a data layout.

data

A matrix or a data frame.

logarithm

A vector of variable names for logarithmic analysis.

n

Maximum number of permutations per data column.

Value

A list with named elements: som contains the self-organizing map, layout contains the district assignments for data points, planes contains smoothed district averages from nroAggregate(), the element ranges contains the reference ranges to be used in nroColorize(), the element statistics contains the output from nroPermute(), the element palette is the name of the colormap and the element data contains the data points that were used for calculating the statistics.

Details

The input argument model can be the output from numero.create() or from numero.quality().

Any variables included in model will be analyzed internally as logarithms. The logarithm is reversed for the output.

Examples

Run this code
# NOT RUN {
# Import data.
fname <- system.file("extdata", "finndiane.txt", package = "Numero")
dataset <- read.delim(file = fname)

# Set identities and manage missing data.
dataset <- numero.clean(dataset, identity = "INDEX")

# Prepare training variables.
trvars <- c("CHOL", "HDL2C", "TG", "CREAT", "uALB")
trdata <- numero.prepare(data = dataset, variables = trvars)

# Create a self-organizing map.
modl <- numero.create(data = trdata)

# Evaluate map statistics for all variables.
results <- numero.evaluate(model = modl, data = dataset)
print(results$statistics[,c("TRAINING", "Z", "P.z", "P.freq")])

# Evaluate map statistics with logarithms for skewed variables.
results <- numero.evaluate(model = modl, data = dataset,
    logarithm=c("TG","CREAT","uALB"))
print(results$statistics[,c("TRAINING", "Z", "P.z", "P.freq")])
# }

Run the code above in your browser using DataLab