clustergscairls: Clustering gsc-models

Description Usage Arguments Value Examples

View source: R/clustergscairls.r

Description

clustergscairls clusters data sets in that way that each cluster has a its own set of coefficients in the gsc-model.

Usage

1
2
clustergscairls(dat, B, indicatorx, indicatory, loadingx = FALSE,
  loadingy = FALSE, k, minmem = FALSE, wieder)

Arguments

dat

(n,p)-matrix, the values of the manifest variables

B

(q,q) lower triangular matrix describing the interrelations of the latent variables: b_ij= 1 regression coefficient of eta_j in the regression relation in which eta_i is b_ij= 0 if eta_i does not depend on eta_j in a direct way (b_ii = 0 !)

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

k

scalar, the number of clusters to be found

minmem

number of the cluster's members or FALSE (then ist is set to 2*number of indicators)

wieder

scalar, the number of random starts

Value

out list with components

member (n,1)-vector, indicator of membership
Bhat (k,q,q)-array, the path coefficients of the clusters
lambda (p,k)-matrix, the loadings of the clusters
fitall the total fit measure for the structural models only
fit vector of length k, the fit values of the different models
R2 (k,q) matrix, the coefficients of determination for the structural regression equations

Examples

1
2
3
4
5
6
7
 
data(twoclm)
dat <- twoclm[,-10]
B <- matrix(c( 0,0,0, 0,0,0, 1,1,0),3,3,byrow=TRUE)
indicatorx <- c(1,1,1,2,2,2)
indicatory <- c(1,1,1)  
out <- clustergscairls(dat,B,indicatorx,indicatory,loadingx=FALSE,loadingy=FALSE,2,minmem=6,1) 

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

Related to clustergscairls in cbsem...