Learn R Programming

cbsem (version 1.0.0)

gscalsresid: For use in clustergscairls, residuals of a gsc-model

Description

gscalsresid computes the residuals of a gsc-model when the parameters and weights are given

Usage

gscalsresid(dat, out, indicatorx, indicatory, loadingx, loadingy)

Arguments

dat

(n,p) data matrix

out

list, output from gscals

indicatorx

vector describing with which exogenous composite the X-variables are connected

indicatory

vector describing with which endogenous composite the Y-variables are connected

loadingx

logical TRUE when there are loadings for the X-variables in the model

loadingy

logical TRUE when there are loadings for the y-variables in the model

Value

resid (n,q2) matrix of residuals from structural model, the q2 is the number of endogenous composites .

Examples

Run this code
# NOT RUN {
data(simplemodel) 
data(gscalsout)
B <- matrix(c( 0,0,0, 0,0,0, 0.7,0.4,0),3,3,byrow=TRUE)
indicatorx <- c(1,1,1,2,2,2)
indicatory <- c(1,1,1)  
out <- gscalsresid(simplemodel,gscalsout,indicatorx,indicatory,TRUE,TRUE)

# }

Run the code above in your browser using DataLab