Interaction Models with plssem

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

library(plssem)
library(modsem)

This vignette shows how to estimate interaction models, with both continuous and ordered (categorical) data.

Model Syntax

m <- '
  X =~ x1 + x2 + x3
  Z =~ z1 + z2 + z3
  Y =~ y1 + y2 + y3

  Y ~ X + Z + X:Z
'

Continuous Indicators

fit_cont <- pls(
  m,
  data      = modsem::oneInt,
  bootstrap = TRUE,
  sample    = 50
)
summary(fit_cont)

Ordered Indicators

fit_ord <- pls(
  m,
  data      = oneIntOrdered,
  bootstrap = TRUE,
  sample    = 50,
  ordered   = colnames(oneIntOrdered) # explicitly specify variables as ordered
)
summary(fit_ord)


Try the plssem package in your browser

Any scripts or data that you put into this service are public.

plssem documentation built on March 23, 2026, 5:08 p.m.