Learn R Programming

wsMed (version 1.0.2)

printGM: Print Formatted SEM Model Syntax

Description

Formats and prints the SEM model syntax generated by GenerateModelCN, GenerateModelCP, GenerateModelP, and GenerateModelPC. It organizes the equations into labeled sections for better readability.

Usage

printGM(x, ...)

Value

Invisibly returns the formatted SEM model syntax.

Arguments

x

A list or character string containing SEM model syntax. If x is a wsMed() result, it will extract and print the model syntax. If x is a GenerateModel*() result, it will format and print the model.

...

Additional arguments (not used).

Examples

Run this code
data(example_data)
head(example_data)
prepared_data <- PrepareData(
  data = example_data,
  M_C1 = c("A1", "B1"),
  M_C2 = c("A2", "B2"),
  Y_C1 = "C1",
  Y_C2 = "C2"
)
sem_model <- GenerateModelPC(prepared_data)
printGM(sem_model)

Run the code above in your browser using DataLab