A quadVAR object is nonlinear, which means that the relationship between variables are not the same across different values of the variables. This function linearizes a quadVAR object by specifying the values of the variables that the linearized model will be based on, to facilitate interpretation. The linearized model is then expressed in an adjacency matrix, which can be used to produce a network.
Usage
linear_quadVAR_network(model, value = NULL, value_standardized = TRUE)
# S3 method for class 'linear_quadVAR_network'
plot(x, interactive = FALSE, ...)
Arguments
- model
A quadVAR object.
- value
A numeric vector of length 1 or the same as the number of nodes, that specifies the values of the variables that the linearized model will be based on. If the length is 1, the same value will be used for all variables. The default value is
NULL
, in which case the value will be set to 0 in calculation, which means (ifvalue_standardized = TRUE
) the linearized model will be based on the mean values of all variables.- value_standardized
A logical value that specifies whether the input value is standardized or not. If TRUE, the input value will be regarded as standardized value, i.e., mean +
value
* sd (e.g., 0 is the mean, 1 is mean + sd, ...). If FALSE, the input value will regarded as in the raw scale of the input data. If the raw dataset was already standardized, this parameter does not have an effect. The default value isTRUE
.- x
A linear_quadVAR_network object.
- interactive
Whether to produce an interactive plot using
shiny
(in which the user can change the values of variables interactively) or a static plot usingqgraph::qgraph()
. Default isFALSE
.- ...
Other arguments passed to
qgraph::qgraph()
.
Value
A linear_quadVAR_network with the following elements:
adj_mat
: the adjacency matrix of the linearized network.standardized_value
: the standardized value that the linearized model is based on.actual_value
: the value in the raw scale of the input data.model
: the input quadVAR object.value_standardized
: the same as the input.
Methods (by generic)
plot(linear_quadVAR_network)
: Produce a plot for the linearized quadVAR model. Ifinteractive = FALSE
, the output will be a qgraph object, which can be further used to calculate centrality measures using, e.g.,qgraph::centrality()
andqgraph::centralityPlot()
.