Skip to contents

This function applies a full ENA modeling pipeline to accumulated data. It is a convenience wrapper that chains together normalization, centering, rotation, projection, and optional optimization. Each step can be customized by supplying an alternative function.

Usage

model(
  data,
  ...,
  normalize = sphere_norm,
  center_with = center,
  rotate_with = rotate,
  project_with = project,
  optimize_with = optimize,
  rotate_fun = ena.rotate.by.generalized,
  rotate_params = list(),
  exclude_zero_networks = TRUE,
  center_to_origin = FALSE,
  self_weight = 2
)

Arguments

data

An `ena.set` object, typically the result of `accumulate()`.

...

Additional arguments passed to the rotation function specified by `rotate_fun`.

normalize

A function to normalize the connection counts. Defaults to `sphere_norm`.

center_with

A function to center the normalized data. Defaults to `center`.

rotate_with

A function to perform the rotation (e.g., SVD). Defaults to `rotate`.

project_with

A function to project the points into the rotated space. Defaults to `project`.

optimize_with

A function to optimize node positions. Defaults to `optimize`. Can be set to `NULL` or `FALSE` to skip.

rotate_fun

The specific rotation function to be used by `rotate_with`. Defaults to `ena.rotate.by.generalized`.

rotate_params

A list of parameters passed to `rotate_fun` as its `params` argument – for example the two group-membership vectors for `ena.rotate.by.mean`, or `list(x_var = "Condition")` for `ena.rotate.by.generalized`. The nested form `list(params = <params>)` is also accepted. When empty (the default), `rotate()` picks its default parameters.

exclude_zero_networks

A logical value passed to `center_with` and `optimize_with`. When `TRUE` (default), units whose line weights are all zero are left at the origin: they do not enter the centering mean, the rotation or the node optimization, and their points and centroids are zero. This is `ena.make.set(center.align.to.origin = TRUE)`, the webtool's rule, for every kind of set. `FALSE` centers on all units, as `center.align.to.origin = FALSE` does.

center_to_origin

A logical value. When `TRUE`, the mean of all projected points is subtracted from both the points and the node positions after optimization, placing the centroid of the space at the origin. This is the default behavior for ONA (Ordered Network Analysis). Defaults to `FALSE`.

self_weight

Ordered sets: weight of a self-connection in its code's node weight, passed to `optimize_with` when it takes `self_weight`. 2 (default) = the node's row plus column sum, so a self-connection counts twice (Zhiqiang Cai's 2021 rule); 1 counts it once.

Value

An `ena.set` object with a complete ENA model, including projected points and node positions.

Examples

data(RS.data)

codes <- c("Data", "Technical.Constraints", "Performance.Parameters",
           "Client.and.Consultant.Requests", "Design.Reasoning",
           "Collaboration")
units <- c("Condition", "UserName")
horizon <- c("Condition", "GroupName")
enaset <- RS.data |>
  accumulate(units, codes, horizon) |>
  model()