umxMatrixFree: Sets labeled matrix cells to free

umxMatrixFreeR Documentation

Sets labeled matrix cells to free

Description

In simulation studies, it is often necessary to rewrite the matrices while testing alternative specifications. This can become very tedious with increasing number of distinct specifications. This tool injects changes into umxMatrix so that this tasks gets more manageable. First, it sets byRow by default. Second, it infers the number of rows automatically. The user needs only passing ncol. Finally and most importantly this function disables auto-labeling, and whenever a label is set, that cell position will be freed. It is required to pass a matrix of labels, as well as a label name.

Usage

umxMatrixFree(
  name = name,
  nrow = NULL,
  ncol = NA,
  free = FALSE,
  values = NA,
  labels = labels,
  byrow = TRUE,
  ...
)

Arguments

name

The name of the matrix: Must be set

nrow

Number of rows in the matrix (Optional)

ncol

Number of columns in the matrix (Required)

free

Whether cells are free (Default FALSE)

values

The values of the matrix (Default NA)

labels

The labels of the matrix (Default NA)

byrow

Default for byrow (TRUE)

...

Accepts all other arguments from umxMatrix()

Value

  • mxMatrix()

See Also

  • umxMatrix()

Examples

## Not run: 

umxMatrixFree('E', type='Symm',  ncol = 3,
  labels =c("eb2",NA,NA,
             NA,"es2",NA,
            NA,NA,NA),
  values=c(.2,0,0,
           0,.2,0,
           0,0,0))
           
 # Will return a umxMatrix free at the eb2 and es2 positions.

## End(Not run)

umx documentation built on Nov. 17, 2023, 1:07 a.m.