Learn R Programming

simsem (version 0.2-8)

simParamPath: Create a set of matrices of parameters for analyzing data that belongs to Path analysis model

Description

This function will create set of matrices of free parameters that belongs to path analysis model. The requirement is to specify regression coefficient matrix.

Usage

simParamPath(..., exo = FALSE)

Arguments

...
Each element of model specification, as described in Details
exo
specify TRUE if users wish to specify both exogenous and endogenous indicators.

Value

  • SimParam object that represents the path analysis model free parameters. This will be used for building SimModel later.

Details

The matrices and vectors in the endogenous side are
  • BEfor regression coefficient matrix (need to be amatrix).
  • PSfor residual covariance matrix (need to be a symmetricmatrix).
  • ALfor indicator intercept (need to be avector).
The only required matrix for the specification in the endogenous side is BE. If users wish to include the exogenous side in their models, these options are available,
  • GAfor regression coefficient matrix from exogenous variable to endogenous variable (need to be amatrix).
  • PHfor exogenous indicator covariance (need to be a symmetricmatrix).
  • KAorMKfor exogenous variable mean (need to be avector).
The only required matrix for the specification with exogenous side is GA. The default specifications if exo=FALSE are
  1. If residual covariance is not specified, then (a) all indicator variances are free, (b) all exogenous covariances are free, (c) all endogenous covariances are fixed.
  2. If indicator means vector is not specified, then the indicator means are free.
The default specifications if exo=TRUE are
  1. If endogenous indicator covariance (PS) is not specified, then (a) all indicator variances are free, (b) all endogenous indicators covariances are fixed.
  2. If endogenous indicators regression coefficient (BE) is not specified, then all coefficients are specified as zero.
  3. If indicator means (KA or AL) are not specified, all indictor means are free.
  4. If exogenous indicators covariance matrix (PH) is not specified, then the matrix is free in every element.

See Also

  • See classSimParamfor the free parameters object details.
  • UsesimParamCFAto specify CFA model and usesimParamSEMto specify full structural equation modeling.

Examples

Run this code
path <- matrix(0, 4, 4)
path[3, 1:2] <- NA
path[4, 3] <- NA
model <- simParamPath(BE=path)

exoPath <- matrix(NA, 3, 2)
model2 <- simParamPath(GA=exoPath, exo=TRUE)

Run the code above in your browser using DataLab