ena {rENA} | R Documentation |
Wrapper to generate, and optionally plot, an ENA model
Description
Generates an ENA model by constructing a dimensional reduction of adjacency (co-occurrence) vectors as defined by the supplied conversations, units, and codes.
Usage
ena(
data,
codes,
units,
conversation,
metadata = NULL,
model = c("EndPoint", "AccumulatedTrajectory", "SeparateTrajectory"),
weight.by = "binary",
window = c("MovingStanzaWindow", "Conversation"),
window.size.back = 1,
include.meta = TRUE,
groupVar = NULL,
groups = NULL,
runTest = FALSE,
points = FALSE,
mean = FALSE,
network = TRUE,
networkMultiplier = 1,
subtractionMultiplier = 1,
unit = NULL,
include.plots = T,
print.plots = F,
...
)
Arguments
data |
data.frame with containing metadata and coded columns |
codes |
vector, numeric or character, of columns with codes |
units |
vector, numeric or character, of columns representing units |
conversation |
vector, numeric or character, of columns to segment conversations by |
metadata |
vector, numeric or character, of columns with additional meta information for units |
model |
character: EndPoint (default), AccumulatedTrajectory, SeparateTrajectory |
weight.by |
"binary" is default, can supply a function to call (e.g. sum) |
window |
MovingStanzaWindow (default) or Conversation |
window.size.back |
Number of lines in the stanza window (default: 1) |
include.meta |
[TBD] |
groupVar |
vector, character, of column name containing group identifiers. If column contains at least two unique values, will generate model using a means rotation (a dimensional reduction maximizing the variance between the means of the two groups) |
groups |
vector, character, of values of groupVar column used for means rotation, plotting, or statistical tests |
runTest |
logical, TRUE will run a Student's t-Test and a Wilcoxon test for groups defined by the groups argument |
points |
logical, TRUE will plot points (default: FALSE) |
mean |
logical, TRUE will plot the mean position of the groups defined in the groups argument (default: FALSE) |
network |
logical, TRUE will plot networks (default: TRUE) |
networkMultiplier |
numeric, scaling factor for non-subtracted networks (default: 1) |
subtractionMultiplier |
numeric, scaling factor for subtracted networks (default: 1) |
unit |
vector, character, name of a single unit to plot |
include.plots |
logical, TRUE will generate plots based on the model (default: TRUE) |
print.plots |
logical, TRUE will show plots in the Viewer(default: FALSE) |
... |
Additional parameters passed to set creation and plotting functions |
Details
This function generates an ena.set object given a data.frame, units, conversations, and codes. After accumulating the adjacency (co-occurrence) vectors, computes a dimensional reduction (projection), and calculates node positions in the projected ENA space. Returns location of the units in the projected space, as well as locations for node positions, and normalized adjacency (co-occurrence) vectors to construct network graphs. Includes options for returning statistical tests between groups of units, as well as plots of units, groups, and networks.
Value
ena.set object
Examples
data(RS.data)
rs = ena(
data = RS.data,
units = c("UserName","Condition", "GroupName"),
conversation = c("Condition","GroupName"),
codes = c('Data',
'Technical.Constraints',
'Performance.Parameters',
'Client.and.Consultant.Requests',
'Design.Reasoning',
'Collaboration'),
window.size.back = 4,
print.plots = FALSE,
groupVar = "Condition",
groups = c("FirstGame", "SecondGame")
)