process_PLS: Estimate a process PLS model and calculate the effects of...

Description Usage Arguments

View source: R/wrappers.R

Description

Estimate a process PLS model and calculate the effects of variables on blocks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
process_PLS(
  data,
  connection_matrix,
  variables_in_block,
  block_names = NULL,
  global_preprocessors = list(),
  local_preprocessors = list(standardize, block_scale),
  parallelise = FALSE,
  n_cores = NULL,
  bootstrap = FALSE,
  bootstrap_iter = 200,
  bootstrap_ci = 0.95,
  n_LVs = NULL,
  max_n_LVs = NULL
)

Arguments

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 connection_matrix. The inner list values can be integers indicating the column number, or the name when column names are set in data.

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 connection_matrix. When the argument is not set, names are extracted from data, or set to dummy names based on ordering when data contains no names.

global_preprocessors

A list of preprocessing functions when unique_node_preprocessing is FALSE, a list of lists of preprocessing functions when unique_node_preprocessing is TRUE. The ordering of the outer list should be the same as that of the connection_matrix. The order of the inner list is only important when the function results differ when their order of application is changed. The funtions will be applied from beginning to end. The supplied function must be invariant to subsampling. User-implemented functions must take a Matrix as input, and return the preprocessed matrix.

local_preprocessors

A list of preprocessing functions when unique_node_preprocessing is FALSE, a list of lists of preprocessing functions when unique_node_preprocessing is TRUE. The ordering of the outer list should be the same as that of the connection_matrix. The order of the inner list is only important when the function results differ when their order of application is changed. The funtions will be applied from beginning to end. The supplied function is assumed to be influenced by subsampling, and therefore can be applied on subsets when (cross-)validating. User-implemented functions must take a Matrix as input, and return the preprocessed matrix. Implemented functions are: (block_scale, standardize, and mean_center)


GeertPostma/pathmodelr documentation built on Oct. 5, 2021, 4:17 p.m.