
Last chance! 50% off unlimited learning
Sale ends in
The matrixpls
method for the generic function predict
predict.
Predicts the reflective indicators of endogenous latent variables using
estimated model and data for the indicators of exogenous latent variables
# S3 method for matrixpls
predict(
object,
newData,
predictionType = c("exogenous", "redundancy", "communality", "composites"),
means = NULL,
...
)
matrixpls estimation result object produced by the matrixpls
function.
A data frame or a matrix containing data used for prediction.
"exogenous" (default) predicts indicators from exogenous composites. "redundancy" and "communality" are alternative strategies described by Chin (2010). "composites" returns the composites calculated by multiplying the data with the weight matrix.
A vector of means of the original data used to calculate intercepts for the linear prediction equations. If not provided, calculated from the new data or assumed zero.
All other arguments are ignored.
a matrix of predicted values for reflective indicators of endogenous latent variables or weighted composites of the indicators.
Wold, H. (1974). Causal flows with latent variables: Partings of the ways in the light of NIPALS modeling. European Economic Review, 5(1), 67<U+2013>86. 10.1016/0014-2921(74)90008-7
Chin, W. W. (2010). How to write up and report PLS analyses. In V. Esposito Vinzi, W. W. Chin, J. Henseler, & H. Wang (Eds.), Handbook of partial least squares (pp. 655<U+2013>690). Berlin Heidelberg: Springer.
Other post-estimation functions:
ave()
,
cei()
,
cr()
,
effects.matrixpls()
,
fitSummary()
,
fitted.matrixpls()
,
gof()
,
htmt()
,
loadings()
,
r2()
,
residuals.matrixpls()
# NOT RUN {
# Run the customer satisfaction example form plspm
# 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)
inner = rbind(IMAG, EXPE, QUAL, VAL, SAT, LOY)
colnames(inner) <- rownames(inner)
# Reflective model
reflective<- matrix(
c(1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1),
27,6, dimnames = list(colnames(satisfaction)[1:27],colnames(inner)))
# empty formative model
formative <- matrix(0, 6, 27, dimnames = list(colnames(inner),
colnames(satisfaction)[1:27]))
satisfaction.model <- list(inner = inner,
reflective = reflective,
formative = formative)
# Estimation using covariance matrix
satisfaction.out <- matrixpls(cov(satisfaction[,1:27]),
model = satisfaction.model)
print(satisfaction.out)
# Predict indicators using means from the data
predict(satisfaction.out,
newData = satisfaction,
means= sapply(satisfaction, mean))
# Calculate composite scores
predict(satisfaction.out,
newData = satisfaction,
predictionType = "composites")
# }
Run the code above in your browser using DataLab