Description Usage Arguments Value
Performs Latent Variable estimation given data and path model specifications
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | path_model(
data,
connection_matrix,
variables_in_block,
block_names = NULL,
estimators = NULL,
start_node_estimator = "normalpls",
middle_node_estimator = "normalpls",
end_node_estimator = "endpls",
initializers = NULL,
start_node_initializer = "Full",
middle_node_initializer = "Full",
end_node_initializer = "Full",
max_iterations = 100,
loggers = NULL,
unique_node_preprocessing = FALSE,
global_preprocessors = list(),
local_preprocessors = list(standardize),
convergence_threshold = 1e-04,
node_class_types = NULL,
parallelise = FALSE,
n_cores = NULL
)
|
data |
A dataframe or matrix containing the data belonging to the process that is being modelled. The rows contain the samples, the columns contain the variables. |
connection_matrix |
A lower triangular matrix where the non zero elements what connections exist. The rows indicate the node where the edge is going to, and the columns indicates the node where the edge is coming from. |
variables_in_block |
A list of lists indicating the variables
corresponding to each block. The ordering of the upper list should be the
same as that of the |
block_names |
An ordered list containing the names that should be
assigned to each block. The ordering of the list should be the same as that
of the |
estimators |
A list of functions indicating which estimator should be
used for which node. The ordering of the list should be the same as that of
the |
start_node_estimator |
An estimator function which estimates a R6Class Node object, or a string indicating the estimation method ("none") meant for estimation of a start type Node. All estimators must implement a common interface, taking only a R6Class Node object as input, and returning nothing. Instead, this function should update the node directly. |
middle_node_estimator |
An estimator function which estimates a R6Class Node object, or a string indicating the estimation method ("none") meant for estimation of a middle type Node. All estimators must implement a common interface, taking only a R6Class Node object as input, and returning nothing. Instead, this function should update the node directly. |
end_node_estimator |
An estimator function which estimates a R6Class Node object, or a string indicating the estimation method ("none") meant for estimation of an end type Node. All estimators must implement a common interface, taking only a R6Class Node object as input, and returning nothing. Instead, this function should update the node directly. |
initializers |
A list of functions indicating which initializer should be
used for which node. The ordering of the list should be the same as that of
the |
start_node_initializer |
An initializer function which estimates a R6Class Node object, or a string indicating the estimation method ("normalpls", "endpls", "pca", or "none") meant for initializing a start type Node. All initializers must implement a common interface, taking only a R6Class Node object as input, and returning nothing. Instead, this function should update the node directly. |
middle_node_initializer |
An initializer function which estimates a R6Class Node object, or a string indicating the estimation method ("normalpls", "endpls", "pca", or "none") meant for initializing a middle type Node. All initializers must implement a common interface, taking only a R6Class Node object as input, and returning nothing. Instead, this function should update the node directly. |
end_node_initializer |
An initializer function which estimates a R6Class Node object, or a string indicating the estimation method ("normalpls", "endpls", "pca", or "none") meant for initializing an end type Node. All initializers must implement a common interface, taking only a R6Class Node object as input, and returning nothing. Instead, this function should update the node directly. |
max_iterations |
An integer indicating the maximum number of iterations before execution of LV estimation is halted when the convergence criterion is not met beforehand. |
loggers |
A listenv of R6Class based logger and/or reporter objects. All
loggers or reports must implement a |
unique_node_preprocessing |
A Boolean indicating whether different nodes
should be preprocesed differently. If |
global_preprocessors |
A list of preprocessing functions when
unique_node_preprocessing is |
local_preprocessors |
A list of preprocessing functions when
unique_node_preprocessing is |
convergence_threshold |
A double indicating the maximum error before the iterations are assumed to have converged. It is compared to the difference between the latent variables of the current and previous iteration. If this difference is less, the algorithm is considered to have converged. A convergence threshold of a difference of 0.0001 between the Sum of Squared Errors of two subsequent iterations is used as a default. |
node_class_types |
A listenv of R6Class Node classes, or R6Classes which inherit the Node class. This option should only be set when the estimators argument is provided and other Node types are needed, or when custom path_modeling methods require new Node inheriting types. |
A listenv of connected, initialized, and estimated nodes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.