umxCLPM: Runs cross-lagged panel models

View source: R/umxCLPM.R

umxCLPMR Documentation

Runs cross-lagged panel models

Description

One way of assessing causal relationships is by introducing time into the analyses. umxCLPM implements three cross-lagged panel models (CLPM) from the literature. The first is the classic CLPM from Heise (1969), the second is the CLPM from Hamaker et al. (2015), and the third is the CLPM from STARTS (1995). You simply pass the number of waves and the data set along with the model you wish to run.

Sketch mode is available; if you pass column names to data, a model object is returned for manipulation later.

Usage

umxCLPM(
  waves,
  name = NULL,
  model = c("Hamaker2015", "Heise1969", "STARTS1995", "IV_RI_CLPM"),
  data = NULL,
  counts = NULL,
  summary = !umx_set_silent(silent = TRUE),
  autoRun = getOption("umx_auto_run"),
  tryHard = c("no", "yes", "ordinal", "search"),
  verbose = FALSE,
  batteries = c("scale", "ordinaloptim"),
  std = FALSE,
  ivs = NULL,
  defn = NULL,
  defto = NULL,
  type = c("Auto", "FIML", "cov", "cor", "WLS", "DWLS", "ULS"),
  allContinuousMethod = c("cumulants", "marginals")
)

Arguments

waves

Number of waves of data.

name

The name of the model (defaults to "Heise1969", "Hamaker2015", "STARTS1995" or "IV_RI_CLPM").

model

Model type ("Hamaker2015", "Heise1969", "STARTS1995", or "IV_RI_CLPM").

data

Data frame for the analysis.

counts

Optional vector of count data columns.

summary

Logical indicating whether to show a summary (default: TRUE if silent is not set).

autoRun

Logical indicating whether to run the model (default to getOption("umx_auto_run")).

tryHard

Method for fitting the model ("no", "yes", "ordinal", "search").

verbose

Logical to control verbose output (default: FALSE).

batteries

A character vector of pre-processing options ("scale", "ordinaloptim", "thresholds").

std

Logical indicating whether to standardize the output (default: FALSE).

ivs

Optional vector of instrumental variable column names.

defn

Optional definition variable.

defto

Optional variable to which to define.

type

The method for handling missing data ("Auto", "FIML", "cov", "cor", "WLS", "DWLS", "ULS").

allContinuousMethod

Method for handling continuous data ("cumulants", "marginals").

Value

An OpenMx model object.

References

Kenny, D.A., & Zautra, A. (1995). The trait-state-error model for multiwave data. Journal of Consulting and Clinical Psychology, 63, 52–59. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/0022-006X.63.1.52")} Hamaker E.L., Kuiper R.M., & Grasman R. (2015). A critique of the cross-lagged panel model. Psychological Methods, 20, 102–116. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/a0038889")} Heise D. R. (1970). Causal inference from panel data. Sociological Methodology, 2, 3–27. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/270780")}

Examples

## Not run: 

# ================
# = 1. Load Data =
# ================
data(docData)
dt <- docData[2:9]

# ============================
# = 2. Make a CLPM model     =
# ============================
hamaker <- umxCLPM(waves = 4, name = "mymodel", model = "Hamaker2015", data = dt)

## End(Not run)

tbates/umx documentation built on Dec. 14, 2024, 11:28 a.m.