Learn R Programming

dpm (version 1.2.0)

get_syntax: Retrieve lavaan model syntax from fitted dpm model

Description

This helper function provides a simple way to retrieve the lavaan model syntax from a fitted dpm() object.

Usage

get_syntax(model, print = TRUE)

Value

Returns a string with the lavaan model syntax for model. If print is TRUE, it is printed to the console as well.

Arguments

model

A dpm object.

print

Print the syntax to the console so it is formatted properly? Default is TRUE.

Examples

Run this code

data("WageData", package = "panelr")
wages <- panel_data(WageData, id = id, wave = t)
fit <- dpm(wks ~ pre(lag(union)) + lag(lwage), data = wages)
get_syntax(fit)

Run the code above in your browser using DataLab