Learn R Programming

rENA (version 0.3.0)

model: Build a Complete ENA Model

Description

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()
)

Value

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

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 additional parameters to pass to the `rotate_fun`.

Examples

Run this code
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()

Run the code above in your browser using DataLab