sempls: Structural Equation Modeling by Partial Least Squares

Description Usage Arguments Value See Also Examples

View source: R/sempls.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
sempls(model, ...)

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

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

pathCoeff(object, ...)
## S3 method for class 'sempls'
pathCoeff(object, ...)
## S3 method for class 'pathCoeff'
print(x, na.print=".", digits=2, abbreviate=FALSE, ...)

totalEffects(object)
## S3 method for class 'sempls'
totalEffects(object)
## S3 method for class 'totalEffects'
print(x, na.print=".", digits=2, abbreviate=FALSE,...)

plsWeights(object)
## S3 method for class 'sempls'
plsWeights(object)
## S3 method for class 'plsWeights'
print(x, na.print=".", digits=2, abbreviate=FALSE, ...)

plsLoadings(object)
## S3 method for class 'sempls'
plsLoadings(object)
## S3 method for class 'plsLoadings'
print(x, type=c("discriminant", "outer", "cross"),
     cutoff=NULL, reldiff=0.2, na.print=".", digits=2, abbreviate=FALSE, ...)

Arguments

model

An object inheriting from class plsm as returned from plsm or read.splsm.

...

Arguments to be passed down.

data

A data.frame containing 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, changing this value to TRUE does not affect the results.

wscheme

A character naming the weighting scheme to use. Possible values are:

  • "A" or "centroid" for the centroid scheme, the default,

  • "B" or "factorial"for the factorial scheme and

  • "C", "pw" or "pathWeighting" for the path weighting scheme.

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, ?cor, can be consulted.

method

A character naming the method to calculate the correlations. Possible values are:

  • "pearson" , the default,

  • "kendall",

  • "spearman".

For more details on the method, the R help, ?cor, can be consulted. Note, that despite of the method argument, pearson correlations are always used for the inner approximation (step 2).

convCrit

The convergence criteria to use:

  • "relative", the default,

  • "square".

verbose

Logical: If FALSE no status messages are printed.

object

An object of class sempls.

x

An object of the according class.

type

If the argument what="loadings", type describes the loadings to be extracted – those are:

  • "discriminant", the default, contrasts outer against cross loadings to check for discrimant validity of the measurement model,

  • "outer" for the outer loadings and

  • "cross" for the cross loadings.

cutoff

A numerical value at which to cutoff the loadings – this means loadings smaller than the cutoff value will not be printed.

reldiff

The argument is only effectiv when type="discriminant". It is a numeric value, specifying the relative difference between outer and cross loadings at which cross loadings will still be printed.

na.print

A character substituting values not to be printed.

digits

minimal number of _significant_ digits, see print.default.

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.

abbreviate

A logical indicating whether dimnames should be abbreviated. For Details see abbreviate. The default is FALSE.

Value

sempls returns an object of class sempls, with the following elements:

coefficients

A 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_coefficient

The matrix of path coefficients.

outer_loadings

The matrix of outer loadings.

cross_loadings

The matrix of cross loadings.

total_effects

The matrix of total effects.

inner_weights

The matrix of inner weights.

outer_weights

The matrix of outer weights.

factor_scores

A data.frame containing the estimated factor scores for the LVs.

data

A data.frame containing the preprocessed obseravtions of the MVs.

incomplete

The 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
data(ECSImobi)
ecsi <- sempls(model=ECSImobi, data=mobi, wscheme="pathWeighting")
ecsi

## create plots
densityplot(ecsi)
densityplot(ecsi, use="prediction")
densityplot(ecsi, use="residuals")

## Values of 'sempls' objects
names(ecsi)
ecsi$outer_weights
ecsi$outer_loadings
ecsi$path_coefficients
ecsi$total_effects


### using convenience methods to sempls results
## path coefficients
pathCoeff(ecsi)

## total effects
totalEffects(ecsi)

## get loadings and check for discriminant validity
(l <- plsLoadings(ecsi))
# outer loadings
print(l, type="outer", digits=2)
# outer loadings greater than 0.5
print(l,type="outer", cutoff=0.5, digits=2)
# cross loadings greater than 0.5
print(l, type="cross", cutoff=0.5, digits=2)


### R-squared
rSquared(ecsi)


### Create .dot representation of the path diagram and
### create .pdf file if graphviz is available.
## Not run: 
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(ecsi))

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

## End(Not run)

Example output

Loading required package: lattice
All 250 observations are valid.
Converged after 6 iterations.
Tolerance: 1e-07
Scheme: path weighting
                                Path Estimate
lam_1_1               Image -> IMAG1    0.745
lam_1_2               Image -> IMAG2    0.599
lam_1_3               Image -> IMAG3    0.576
lam_1_4               Image -> IMAG4    0.769
lam_1_5               Image -> IMAG5    0.744
lam_2_1         Expectation -> CUEX1    0.771
lam_2_2         Expectation -> CUEX2    0.691
lam_2_3         Expectation -> CUEX3    0.608
lam_3_1             Quality -> PERQ1    0.803
lam_3_2             Quality -> PERQ2    0.638
lam_3_3             Quality -> PERQ3    0.784
lam_3_4             Quality -> PERQ4    0.769
lam_3_5             Quality -> PERQ5    0.755
lam_3_6             Quality -> PERQ6    0.775
lam_3_7             Quality -> PERQ7    0.780
lam_4_1               Value -> PERV1    0.902
lam_4_2               Value -> PERV2    0.940
lam_5_1        Satisfaction -> CUSA1    0.792
lam_5_2        Satisfaction -> CUSA2    0.847
lam_5_3        Satisfaction -> CUSA3    0.857
lam_6_1          Complaints -> CUSCO    1.000
lam_7_1             Loyalty -> CUSL1    0.820
lam_7_2             Loyalty -> CUSL2    0.202
lam_7_3             Loyalty -> CUSL3    0.915
beta_1_2        Image -> Expectation    0.505
beta_2_3      Expectation -> Quality    0.557
beta_2_4        Expectation -> Value    0.050
beta_3_4            Quality -> Value    0.558
beta_1_5       Image -> Satisfaction    0.179
beta_2_5 Expectation -> Satisfaction    0.063
beta_3_5     Quality -> Satisfaction    0.512
beta_4_5       Value -> Satisfaction    0.195
beta_5_6  Satisfaction -> Complaints    0.528
beta_1_7            Image -> Loyalty    0.196
beta_5_7     Satisfaction -> Loyalty    0.485
beta_6_7       Complaints -> Loyalty    0.067
 [1] "coefficients"      "path_coefficients" "outer_loadings"   
 [4] "cross_loadings"    "total_effects"     "inner_weights"    
 [7] "outer_weights"     "blocks"            "factor_scores"    
[10] "data"              "scaled"            "model"            
[13] "weighting_scheme"  "weights_evolution" "sum1"             
[16] "pairwise"          "method"            "iterations"       
[19] "convCrit"          "verbose"           "tolerance"        
[22] "maxit"             "N"                 "incomplete"       
[25] "Hanafi"           
          Image Expectation   Quality     Value Satisfaction Complaints
IMAG1 0.3013122   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG2 0.2596912   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG3 0.2179231   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG4 0.3285036   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG5 0.3246814   0.0000000 0.0000000 0.0000000    0.0000000          0
CUEX1 0.0000000   0.5211807 0.0000000 0.0000000    0.0000000          0
CUEX2 0.0000000   0.4736797 0.0000000 0.0000000    0.0000000          0
CUEX3 0.0000000   0.4456342 0.0000000 0.0000000    0.0000000          0
PERQ1 0.0000000   0.0000000 0.2131750 0.0000000    0.0000000          0
PERQ2 0.0000000   0.0000000 0.1447217 0.0000000    0.0000000          0
PERQ3 0.0000000   0.0000000 0.2000177 0.0000000    0.0000000          0
PERQ4 0.0000000   0.0000000 0.1793995 0.0000000    0.0000000          0
PERQ5 0.0000000   0.0000000 0.1786357 0.0000000    0.0000000          0
PERQ6 0.0000000   0.0000000 0.1791207 0.0000000    0.0000000          0
PERQ7 0.0000000   0.0000000 0.2154815 0.0000000    0.0000000          0
PERV1 0.0000000   0.0000000 0.0000000 0.4792825    0.0000000          0
PERV2 0.0000000   0.0000000 0.0000000 0.6040560    0.0000000          0
CUSA1 0.0000000   0.0000000 0.0000000 0.0000000    0.3648649          0
CUSA2 0.0000000   0.0000000 0.0000000 0.0000000    0.3831560          0
CUSA3 0.0000000   0.0000000 0.0000000 0.0000000    0.4509612          0
CUSCO 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          1
CUSL1 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          0
CUSL2 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          0
CUSL3 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          0
        Loyalty
IMAG1 0.0000000
IMAG2 0.0000000
IMAG3 0.0000000
IMAG4 0.0000000
IMAG5 0.0000000
CUEX1 0.0000000
CUEX2 0.0000000
CUEX3 0.0000000
PERQ1 0.0000000
PERQ2 0.0000000
PERQ3 0.0000000
PERQ4 0.0000000
PERQ5 0.0000000
PERQ6 0.0000000
PERQ7 0.0000000
PERV1 0.0000000
PERV2 0.0000000
CUSA1 0.0000000
CUSA2 0.0000000
CUSA3 0.0000000
CUSCO 0.0000000
CUSL1 0.4606647
CUSL2 0.1142695
CUSL3 0.6543106
          Image Expectation   Quality     Value Satisfaction Complaints
IMAG1 0.7452081   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG2 0.5992004   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG3 0.5763590   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG4 0.7687617   0.0000000 0.0000000 0.0000000    0.0000000          0
IMAG5 0.7444524   0.0000000 0.0000000 0.0000000    0.0000000          0
CUEX1 0.0000000   0.7707672 0.0000000 0.0000000    0.0000000          0
CUEX2 0.0000000   0.6912455 0.0000000 0.0000000    0.0000000          0
CUEX3 0.0000000   0.6078126 0.0000000 0.0000000    0.0000000          0
PERQ1 0.0000000   0.0000000 0.8031781 0.0000000    0.0000000          0
PERQ2 0.0000000   0.0000000 0.6381464 0.0000000    0.0000000          0
PERQ3 0.0000000   0.0000000 0.7837469 0.0000000    0.0000000          0
PERQ4 0.0000000   0.0000000 0.7694797 0.0000000    0.0000000          0
PERQ5 0.0000000   0.0000000 0.7547214 0.0000000    0.0000000          0
PERQ6 0.0000000   0.0000000 0.7746433 0.0000000    0.0000000          0
PERQ7 0.0000000   0.0000000 0.7798648 0.0000000    0.0000000          0
PERV1 0.0000000   0.0000000 0.0000000 0.9022112    0.0000000          0
PERV2 0.0000000   0.0000000 0.0000000 0.9396248    0.0000000          0
CUSA1 0.0000000   0.0000000 0.0000000 0.0000000    0.7924124          0
CUSA2 0.0000000   0.0000000 0.0000000 0.0000000    0.8470215          0
CUSA3 0.0000000   0.0000000 0.0000000 0.0000000    0.8566927          0
CUSCO 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          1
CUSL1 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          0
CUSL2 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          0
CUSL3 0.0000000   0.0000000 0.0000000 0.0000000    0.0000000          0
        Loyalty
IMAG1 0.0000000
IMAG2 0.0000000
IMAG3 0.0000000
IMAG4 0.0000000
IMAG5 0.0000000
CUEX1 0.0000000
CUEX2 0.0000000
CUEX3 0.0000000
PERQ1 0.0000000
PERQ2 0.0000000
PERQ3 0.0000000
PERQ4 0.0000000
PERQ5 0.0000000
PERQ6 0.0000000
PERQ7 0.0000000
PERV1 0.0000000
PERV2 0.0000000
CUSA1 0.0000000
CUSA2 0.0000000
CUSA3 0.0000000
CUSCO 0.0000000
CUSL1 0.8204132
CUSL2 0.2020217
CUSL3 0.9154363
             Image Expectation  Quality      Value Satisfaction Complaints
Image            0   0.5049139 0.000000 0.00000000   0.17873950  0.0000000
Expectation      0   0.0000000 0.556749 0.04998839   0.06252287  0.0000000
Quality          0   0.0000000 0.000000 0.55830438   0.51202394  0.0000000
Value            0   0.0000000 0.000000 0.00000000   0.19476510  0.0000000
Satisfaction     0   0.0000000 0.000000 0.00000000   0.00000000  0.5280662
Complaints       0   0.0000000 0.000000 0.00000000   0.00000000  0.0000000
Loyalty          0   0.0000000 0.000000 0.00000000   0.00000000  0.0000000
                Loyalty
Image        0.19575533
Expectation  0.00000000
Quality      0.00000000
Value        0.00000000
Satisfaction 0.48547762
Complaints   0.06692607
Loyalty      0.00000000
             Image Expectation   Quality     Value Satisfaction Complaints
Image            0   0.5049139 0.2811103 0.1821850    0.3897266  0.2058015
Expectation      0   0.0000000 0.5567490 0.3608238    0.4178675  0.2206617
Quality          0   0.0000000 0.0000000 0.5583044    0.6207622  0.3278035
Value            0   0.0000000 0.0000000 0.0000000    0.1947651  0.1028489
Satisfaction     0   0.0000000 0.0000000 0.0000000    0.0000000  0.5280662
Complaints       0   0.0000000 0.0000000 0.0000000    0.0000000  0.0000000
Loyalty          0   0.0000000 0.0000000 0.0000000    0.0000000  0.0000000
                Loyalty
Image        0.39873238
Expectation  0.21763337
Quality      0.32330474
Value        0.10143737
Satisfaction 0.52081902
Complaints   0.06692607
Loyalty      0.00000000
             Image Expectation Quality Value Satisfaction Complaints Loyalty
Image            .       0.505       .     .        0.179          .   0.196
Expectation      .           .   0.557 0.050        0.063          .       .
Quality          .           .       . 0.558        0.512          .       .
Value            .           .       .     .        0.195          .       .
Satisfaction     .           .       .     .            .      0.528   0.485
Complaints       .           .       .     .            .          .   0.067
Loyalty          .           .       .     .            .          .       .
             Image Expectation Quality Value Satisfaction Complaints Loyalty
Image            .       0.505   0.281 0.182        0.390      0.206   0.399
Expectation      .           .   0.557 0.361        0.418      0.221   0.218
Quality          .           .       . 0.558        0.621      0.328   0.323
Value            .           .       .     .        0.195      0.103   0.101
Satisfaction     .           .       .     .            .      0.528   0.521
Complaints       .           .       .     .            .          .   0.067
Loyalty          .           .       .     .            .          .       .
      Image Expectation Quality Value Satisfaction Complaints Loyalty
IMAG1  0.75           .       .     .            .          .       .
IMAG2  0.60           .    0.50     .            .          .       .
IMAG3  0.58           .       .     .            .          .       .
IMAG4  0.77           .       .     .            .          .       .
IMAG5  0.74           .       .     .            .          .       .
CUEX1     .        0.77       .     .            .          .       .
CUEX2     .        0.69       .     .            .          .       .
CUEX3     .        0.61       .     .            .          .       .
PERQ1     .           .    0.80     .         0.68          .       .
PERQ2     .           .    0.64     .            .          .       .
PERQ3  0.63           .    0.78     .         0.65          .       .
PERQ4     .           .    0.77     .            .          .       .
PERQ5  0.61           .    0.75     .            .          .       .
PERQ6     .           .    0.77     .            .          .       .
PERQ7     .           .    0.78     .         0.70          .       .
PERV1     .           .       .  0.90            .          .       .
PERV2     .           .       .  0.94            .          .       .
CUSA1     .           .    0.64     .         0.79          .       .
CUSA2     .           .       .     .         0.85          .       .
CUSA3     .           .       .     .         0.86          .       .
CUSCO     .           .       .     .            .       1.00       .
CUSL1     .           .       .     .            .          .    0.82
CUSL2     .           .       .     .            .          .    0.20
CUSL3     .           .       .     .            .          .    0.92
      Image Expectation Quality Value Satisfaction Complaints Loyalty
IMAG1  0.75           .       .     .            .          .       .
IMAG2  0.60           .       .     .            .          .       .
IMAG3  0.58           .       .     .            .          .       .
IMAG4  0.77           .       .     .            .          .       .
IMAG5  0.74           .       .     .            .          .       .
CUEX1     .        0.77       .     .            .          .       .
CUEX2     .        0.69       .     .            .          .       .
CUEX3     .        0.61       .     .            .          .       .
PERQ1     .           .    0.80     .            .          .       .
PERQ2     .           .    0.64     .            .          .       .
PERQ3     .           .    0.78     .            .          .       .
PERQ4     .           .    0.77     .            .          .       .
PERQ5     .           .    0.75     .            .          .       .
PERQ6     .           .    0.77     .            .          .       .
PERQ7     .           .    0.78     .            .          .       .
PERV1     .           .       .  0.90            .          .       .
PERV2     .           .       .  0.94            .          .       .
CUSA1     .           .       .     .         0.79          .       .
CUSA2     .           .       .     .         0.85          .       .
CUSA3     .           .       .     .         0.86          .       .
CUSCO     .           .       .     .            .       1.00       .
CUSL1     .           .       .     .            .          .    0.82
CUSL2     .           .       .     .            .          .    0.20
CUSL3     .           .       .     .            .          .    0.92
      Image Expectation Quality Value Satisfaction Complaints Loyalty
IMAG1  0.75           .       .     .            .          .       .
IMAG2  0.60           .       .     .            .          .       .
IMAG3  0.58           .       .     .            .          .       .
IMAG4  0.77           .       .     .            .          .       .
IMAG5  0.74           .       .     .            .          .       .
CUEX1     .        0.77       .     .            .          .       .
CUEX2     .        0.69       .     .            .          .       .
CUEX3     .        0.61       .     .            .          .       .
PERQ1     .           .    0.80     .            .          .       .
PERQ2     .           .    0.64     .            .          .       .
PERQ3     .           .    0.78     .            .          .       .
PERQ4     .           .    0.77     .            .          .       .
PERQ5     .           .    0.75     .            .          .       .
PERQ6     .           .    0.77     .            .          .       .
PERQ7     .           .    0.78     .            .          .       .
PERV1     .           .       .  0.90            .          .       .
PERV2     .           .       .  0.94            .          .       .
CUSA1     .           .       .     .         0.79          .       .
CUSA2     .           .       .     .         0.85          .       .
CUSA3     .           .       .     .         0.86          .       .
CUSCO     .           .       .     .            .       1.00       .
CUSL1     .           .       .     .            .          .    0.82
CUSL2     .           .       .     .            .          .       .
CUSL3     .           .       .     .            .          .    0.92
      Image Expectation Quality Value Satisfaction Complaints Loyalty
IMAG1  0.75           .    0.57     .         0.55          .       .
IMAG2  0.60           .       .     .            .          .       .
IMAG3  0.58           .       .     .            .          .       .
IMAG4  0.77           .    0.57     .         0.55          .       .
IMAG5  0.74           .    0.55     .         0.51          .       .
CUEX1     .        0.77       .     .            .          .       .
CUEX2     .        0.69       .     .            .          .       .
CUEX3     .        0.61       .     .            .          .       .
PERQ1  0.63        0.51    0.80     .         0.68          .       .
PERQ2     .           .    0.64     .            .          .       .
PERQ3  0.63           .    0.78     .         0.65          .       .
PERQ4     .           .    0.77     .         0.60          .       .
PERQ5  0.61           .    0.75     .         0.52          .       .
PERQ6  0.57           .    0.77     .         0.55          .       .
PERQ7  0.59           .    0.78  0.55         0.70          .       .
PERV1     .           .       .  0.90            .          .       .
PERV2  0.53           .    0.59  0.94         0.62          .    0.54
CUSA1  0.58           .    0.64     .         0.79          .    0.50
CUSA2  0.52           .    0.67     .         0.85          .       .
CUSA3  0.62           .    0.67  0.60         0.86       0.55    0.63
CUSCO     .           .    0.53     .         0.53       1.00       .
CUSL1     .           .       .     .            .          .    0.82
CUSL2     .           .       .     .            .          .       .
CUSL3  0.54           .    0.53     .         0.66          .    0.92
             R-squared
Image                .
Expectation       0.25
Quality           0.31
Value             0.35
Satisfaction      0.68
Complaints        0.28
Loyalty           0.46
Running  dot -Tpdf -o ecsiPLS1.pdf  ecsiPLS1.dot 
Running  dot -Tpdf -o ecsiPLS2.pdf  ecsiPLS2.dot 
Running  dot -Tpdf -o ecsiPLS3.pdf  ecsiPLS3.dot 

semPLS documentation built on May 2, 2019, 9:34 a.m.