psych (version 1.0-97)

super.matrix: Form a super matrix from two sub matrices.

Description

Given the matrices nXm, and jYk, form the super matrix of dimensions (n+j) and (m+k) with with elements x and y along the super diagonal. Useful when considering structural equations. The measurement models x and y can be combined into a larger measurement model of all of the variables.

Usage

super.matrix(x, y)

Arguments

x
A n x m matrix
y
A j x k matrix

Value

  • A (n+j) x (m +k) matrix with appropriate row and column names

See Also

sim.structural,structure.graph

Examples

Run this code
mx <- matrix(c(.9,.8,.7,rep(0,4),.8,.7,.6),ncol=2)
my <- matrix(c(.6,.5,.4))
colnames(mx) <- paste("X",1:dim(mx)[2],sep="")
rownames(mx) <- paste("Xv",1:dim(mx)[1],sep="")
colnames(my) <- "Y"
rownames(my) <- paste("Yv",1:3,sep="")
super.matrix(mx,my)

Run the code above in your browser using DataLab