matrixpls.plspm: A plspm compatibility wrapper for matrixpls

View source: R/matrixpls.plspm.R

matrixpls.plspmR Documentation

A plspm compatibility wrapper for matrixpls

Description

matrixpls.plspm mimics plspm function of the plspm package. The arguments and their default values and the output of the function are identical with plspm function, but internally the function uses matrixpls estimation.

Usage

matrixpls.plspm(
  Data,
  path_matrix,
  blocks,
  modes = NULL,
  scheme = "centroid",
  scaled = TRUE,
  tol = 1e-06,
  maxiter = 100,
  boot.val = FALSE,
  br = NULL,
  dataset = TRUE
)

Arguments

Data

matrix or data frame containing the manifest variables.

path_matrix

A square (lower triangular) boolean matrix representing the inner model (i.e. the path relationships between latent variables).

blocks

list of vectors with column indices or column names from Data indicating the sets of manifest variables forming each block (i.e. which manifest variables correspond to each block).

modes

character vector indicating the type of measurement for each block. Possible values are: "A", "B". The length of modes must be equal to the length of blocks.

scheme

string indicating the type of inner weighting scheme. Possible values are "centroid", "factorial", or "path".

scaled

whether manifest variables should be standardized. When (TRUE, data is scaled to standardized values (mean=0 and variance=1). The variance is calculated dividing by N instead of N-1).

tol

decimal value indicating the tolerance criterion for the iterations (tol=0.000001). Can be specified between 0 and 0.001.

maxiter

integer indicating the maximum number of iterations (maxiter=100 by default). The minimum value of maxiter is 100.

boot.val

whether bootstrap validation should be performed. (FALSE by default).

br

number bootstrap resamples. Used only when boot.val=TRUE. When boot.val=TRUE, the default number of re-samples is 100.

dataset

whether the data matrix used in the computations should be retrieved (TRUE by default).

Details

The function matrixpls.plspm calculates indicator weights and estimates a model identically to the plspm function. In contrast to the matrixpls function that provides only weights and parameter estimates, this function also reports multiple post-estimation statistics. Because of this matrixpls.plspm is substantially less efficient than the matrixpls function.

The argument path_matrix is a matrix of zeros and ones that indicates the structural relationships between composites. This must be a lower triangular matrix. path_matrix will contain a 1 when column j affects row i, 0 otherwise.

Value

An object of class "plspm".

outer_model

Results of the outer model. Includes: outer weights, standardized loadings, communalities, and redundancies

inner_model

Results of the inner (structural) model. Includes: path coeffs and R-squared for each endogenous latent variable

scores

Matrix of latent variables used to estimate the inner model. If scaled=FALSE then scores are latent variables calculated with the original data (non-standardized).

path_coefs

Matrix of path coefficients (this matrix has a similar form as path_matrix)

crossloadings

Correlations between the latent variables and the manifest variables (also called crossloadings)

inner_summary

Summarized results of the inner model. Includes: type of LV, type of measurement, number of indicators, R-squared, average communality, average redundancy, and average variance extracted

effects

Path effects of the structural relationships. Includes: direct, indirect, and total effects

unidim

Results for checking the unidimensionality of blocks (These results are only meaningful for reflective blocks)

gof

Goodness-of-Fit index

data

Data matrix containing the manifest variables used in the model. Only available when dataset=TRUE

boot

List of bootstrapping results; only available when argument boot.val=TRUE

References

Sanchez, G. (2013). PLS Path Modeling with R. Retrieved from http://www.gastonsanchez.com/PLS Path Modeling with R.pdf #'

Examples

cores <- getOption("mc.cores")
options(mc.cores=2)

# Run the example from plspm package

# load dataset satisfaction
data(satisfaction)
# inner model matrix
IMAG = c(0,0,0,0,0,0)
EXPE = c(1,0,0,0,0,0)
QUAL = c(0,1,0,0,0,0)
VAL = c(0,1,1,0,0,0)
SAT = c(1,1,1,1,0,0)
LOY = c(1,0,0,0,1,0)
sat_inner = rbind(IMAG, EXPE, QUAL, VAL, SAT, LOY)
# outer model list
sat_outer = list(1:5, 6:10, 11:15, 16:19, 20:23, 24:27)
# vector of modes (reflective indicators)
sat_mod = rep("A", 6)

# apply matrixpls
matrixpls.res <- matrixpls.plspm(satisfaction, sat_inner, sat_outer, sat_mod,
                                 scaled=FALSE, boot.val=FALSE)

print(summary(matrixpls.res))

options(mc.cores=cores)


mronkko/matrixpls documentation built on April 19, 2024, 4:23 p.m.