Description Usage Arguments Value References See Also Examples
View source: R/matrixpls.sempls.R
matrixpls.sempls
mimics sempls
function of the semPLS
package.
The arguments and their default values and the output of the function are identical with sempls
function,
but internally the function uses matrixpls estimation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
model |
An object inheriting from class |
data |
A |
maxit |
A |
tol |
A |
scaled |
A |
sum1 |
A |
wscheme |
A
|
pairwise |
A |
method |
A
For more details on the method, the R help, |
convCrit |
The convergence criteria to use:
|
verbose |
Logical: If |
... |
Other arguments are ignored |
An object of class sempls
.
Monecke, A., & Leisch, F. (2012). semPLS: Structural Equation Modeling Using Partial Least Squares. Journal of Statistical Software, 48(3), 1–32.
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 | if(!require(semPLS)){
print("This example requires the semPLS package")
} else{
data(ECSImobi)
ecsi.sempls <- sempls(model=ECSImobi, data=mobi, wscheme="pathWeighting")
ecsi <- matrixpls.sempls(model=ECSImobi, data=mobi, wscheme="pathWeighting")
# If RUnit is installed check that the results are identical
if(require(RUnit)){
checkEquals(ecsi.sempls,ecsi, check.attributes = FALSE)
}
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.