Learn R Programming

semPLS (version 0.8-7)

sempls: Structural Equation Modeling by Partial Least Squares

Description

sempls fits structural equation models by the patial least squares (PLS) method. The estimation is based on the raw data and requires no distributional assumptions.

Usage

sempls(model, ...)

## S3 method for class 'plsm': sempls(model, data, maxit=20, tol=1e-7, scaled=TRUE,sum1=FALSE, E="A", pairwise=FALSE, method=c("pearson", "kendall", "spearman"), convCrit=c("relative", "square"), ...)

## S3 method for class 'sempls': print(x, \ldots)

## S3 method for class 'sempls': plot(x, \ldots)

## S3 method for class 'sempls': densityplot(x, data, use=c("fscores", "prediction", "residuals"), ...)

Arguments

model
An object of class splsm as returned from read.splsm.
...
Arguments to be passed down.
data
A data.frame containing the the observed variables (MVs). The storage mode for all the MVs included in the model must be numeric.
maxit
A numeric value, which determines the maximum number of iterations performed by the PLS algorithm. The default is $20$ iterations.
tol
A numeric value, specifying the tolerance for the maximum relative differences in the outer weights. The default value is $10^{-7}$.
scaled
A logical value indicating, whether the observed data shall be scaled to zero mean and unit variance. The default is TRUE.
sum1
A logical value indicating, whether the outer weights foreach latent variable (LV) shall be standardized to sum up to one. The default is FALSE. Since the factor scores are scaled in each step of the PLS algorithm, ch
E
A character naming the weighting scheme to use. Possible values are:
  • "A"for the centroid scheme, the default,
  • "B"for the factorial scheme and
  • "C"for the path weighting sch
pairwise
A logical value indicating, whether correlations shall be calculated pairwise. If the observed data does not contain missing values, the results are not affected. The default is FALSE. For more details the R help,
method
A character naming the method to calculate the correlations. Possible values are:
  • "pearson", the default,
  • "kendall",
  • "spearman".
For more details on the met
convCrit
The convergence criteria to use:
  • "relative", the default,
  • "square".
x
An object of class sempls returned by the sempls method.
use
The values for which the density plots are created. If
  • "fscores": the factor scores are used,
  • "prediction": the estimated factor scores are used,
  • "residuals": the residuals are used.
  • <

Value

  • sempls returns an object of class sempls, with the following elements:
  • coefficientsA data.frame containing the estimates for all the arcs in the path model, those are the outer loadings for mode A type LVs and outer weights for mode B type LVs and path coefficients for those belonging to the structural model.
  • path_coefficientThe matrix of path coefficients.
  • outer_loadingsThe matrix of outer loadings.
  • cross_loadingsThe matrix of cross loadings.
  • total_effectsThe matrix of total effects.
  • inner_weightsThe matrix of inner weights.
  • outer_weightsThe matrix of outer weights.
  • factor_scoresA data.frame containing the estimated factor scores for the LVs.
  • dataA data.frame containing the preprocessed obseravtions of the MVs.
  • incompleteThe index of the incomplete observations.
  • ...All the other values are just storing information used in the call.

See Also

plsm, read.splsm, rSquared, pathDiagram, bootsempls, plsm2sem, sem

Examples

Run this code
data(ECSImobi)
ecsi <- sempls(model=ECSImobi, data=mobi, E="C")
ecsi

densityplot(ecsi)
densityplot(ecsi, use="prediction")
densityplot(ecsi, use="residuals")

names(ecsi)
ecsi$outer_weights
ecsi$outer_loadings
ecsi$path_coefficients
ecsi$total_effects

### R-squared
rSquared(ecsi)


### Create .dot representation of the path diagram and
### create .pdf file if graphviz is available.
pathDiagram(ecsi, file="ecsiPLS1", edge.labels="both",
            output.type="graphics", digits=3, graphics.fmt = "pdf")

# include R-squared values
pathDiagram(ecsi, file="ecsiPLS2", edge.labels="both",
            output.type="graphics", digits=3, graphics.fmt = "pdf",
            rSquared=Rsquared)

# only the structural model
pathDiagram(ecsi, file="ecsiPLS3", edge.labels="both",
            output.type="graphics", digits=3, graphics.fmt = "pdf",
            rSquared=Rsquared, full=FALSE)

Run the code above in your browser using DataLab