matrixpls: Partial Least Squares and other composite variable models.

View source: R/matrixpls.R

matrixplsR Documentation

Partial Least Squares and other composite variable models.

Description

Estimates a weight matrix using Partial Least Squares or a related algorithm and then uses the weights to estimate the parameters of a statistical model.

Usage

matrixpls(
  S,
  model,
  W.model = NULL,
  weightFun = weightFun.pls,
  parameterEstim = parameterEstim.separate,
  weightSign = NULL,
  ...,
  validateInput = TRUE,
  standardize = TRUE
)

Arguments

S

Covariance matrix of the data.

model

There are two options for this argument: 1. lavaan script or lavaan parameter table, or 2. a list containing three matrices inner, reflective, and formative defining the free regression paths in the model.

W.model

An optional numeric matrix representing the weight pattern and starting weights (i.e. the how the indicators are combined to form the composite variables). If this argument is not specified, the weight patter is defined based on the relationships in the reflective and formative elements of model.

weightFun

A function for calculating indicator weights using the data covariance matrix S, a model specification model, and a weight pattern W.model. Returns a weight matrix W. The default is weightFun.pls

parameterEstim

A function for estimating the model parameters using the data covariance matrix S, model specification model, and weight matrix W. Returns a named vector of parameter estimates. The default is parameterEstim.separate

weightSign

A function for resolving weight sign ambiguity based on the data covariance matrix S and a weight matrix W. Returns a weight matrix W. See weightSign for details.

...

All other arguments are passed through to weightFun and parameterEstim.

validateInput

If TRUE, the arguments are validated.

standardize

If TRUE, S is converted to a correlation matrix before analysis.

Details

matrixpls is the main function of the matrixpls package. This function parses a model object and then uses the results to call weightFun to to calculate indicator weight. After this the parameterEstim function is applied to the indicator weights, the data covariance matrix, and the model object and the resulting parameter estimates are returned.

Model can be specified in the lavaan format or the native matrixpls format. The native model format is a list of three binary matrices, inner, reflective, and formative specifying the free parameters of a model: inner (l x l) specifies the regressions between composites, reflective (k x l) specifies the regressions of observed data on composites, and formative (l x k) specifies the regressions of composites on the observed data. Here k is the number of observed variables and l is the number of composites.

If the model is specified in lavaan format, the native format model is derived from this model by assigning all regressions between latent variables to inner, all factor loadings to reflective, and all regressions of latent variables on observed variables to formative. Regressions between observed variables and all free covariances are ignored. All parameters that are specified in the model will be treated as free parameters.

The original papers about Partial Least Squares, as well as many of the current PLS implementations, impose restrictions on the matrices inner, reflective, and formative: inner must be a lower triangular matrix, reflective must have exactly one non-zero value on each row and must have at least one non-zero value on each column, and formative must only contain zeros. Some PLS implementations allow formative to contain non-zero values, but impose a restriction that the sum of reflective and t(formative) must satisfy the original restrictions of reflective. The only restrictions that matrixpls imposes on inner, reflective, and formative is that these must be binary matrices and that the diagonal of inner must be zeros.

The argument W.model is a (l x k) matrix that indicates how the indicators are combined to form the composites. The original papers about Partial Least Squares as well as all current PLS implementations define this as t(reflective) | formative, which means that the weight patter must match the model specified in reflective and formative. Matrixpls does not require that W.model needs to match reflective and formative, but accepts any numeric matrix. If this argument is not specified, all elements of W.model that correspond to non-zero elements in the reflective or formative formative matrices receive the value 1.

Value

A named numeric vector of class matrixpls containing the parameter estimates followed by weights.

matrixpls returns the following as attributes:

W

the weight matrix.

model

the model specification in native format.

call

the function call.

Additionally, all attributes returned by functions called by matrixpls are returned. This can include:

S

the sample covariance matrix.

E

inner weight matrix.

iterations

the number of iterations used by the weight algorithm.

converged

TRUE if the weight algorithm converged and FALSE otherwise.

history

weight optimization history as a matrix.

C

the composite correlation matrix (after disattenuation, if requested).

IC

the indicator-composite covariance matrix (after disattenuation, if requested).

inner

the inner model matrix with estimated parameters.

reflective

the reflective model matrix with estimated parameters.

formative

the formative model matrix with estimated parameters.

Q

the reliability estimates used in disattenuation.

c

the PLSc loading estimate correction factors.

References

Rosseel, Y. (2012). lavaan: An R Package for Structural Equation Modeling. Journal of Statistical Software, 48(2), 1–36. Retrieved from http://www.jstatsoft.org/v48/i02

Wold, H. (1982). Soft modeling - The Basic Design And Some Extensions. In K. G. Jöreskog & S. Wold (Eds.),Systems under indirect observation: causality, structure, prediction (pp. 1–54). Amsterdam: North-Holland.

See Also

Weight algorithms: weightFun.pls; weightFun.fixed; weightFun.optim; weightFun.principal; weightFun.factor

Weight sign corrections:weightSign.Wold1985; weightSign.dominantIndicator

Parameter estimators: parameterEstim.separate


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