get_syntax: Retrieve lavaan model syntax from fitted dpm model

View source: R/dpm.R

get_syntaxR Documentation

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)

Arguments

model

A dpm object.

print

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

Value

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

Examples


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)


jacob-long/dpm documentation built on Feb. 6, 2024, 1:16 a.m.