Learn R Programming

simsem (version 0.2-8)

simVector: Create simVector that save free parameters and starting values, as well as fixed values

Description

Create SimVector object that save free parameters and starting values, as well as fixed values. This will be used for model specification later, such as for factor mean vector or measurement error variance vector.

Usage

simVector(free = NULL, value = NULL)

Arguments

free
Vector of free parameters. Use NA to specify free parameters. Use number as fixed value (including zero). If this argument is not specified, the information from the value argument is used. The positions in the value
value
Starting values. Can be either one element or vector with the same length as free parameter vector. Each element can be numbers (in either as.numeric or as.character format) or the name of distribution object V

Value

  • SimVector object that will be used for model specification later.

See Also

  • SeeSimVectorfor the resulting object.
  • SeesimMatrixfor creating simMatrix.
  • SeesymMatrixfor creating symmetric simMatrix.

Examples

Run this code
factor.mean <- rep(NA, 4)
AL <- simVector(factor.mean, 0)

n02 <- simNorm(0, 0.2)
factor.start <- rep("n02", 4)
KA <- simVector(factor.mean, factor.start)

start <- c(2, 0, 0, 1)
VE <- simVector(value=start)

Run the code above in your browser using DataLab