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

Description Usage Arguments Value Examples

View source: R/clustergscairls.r

Description

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

Usage

1
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

1
2
3
4
5
6
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)

cbsem documentation built on May 2, 2019, 5:56 a.m.

Related to gscalsresid in cbsem...