silp: silp

View source: R/silp.R

silpR Documentation

silp

Description

This function extends the lavaan function, allowing users to define moderation effects using the symbol ":". The RAPI method is used to estimate moderation effects.

Usage

silp(model, data, center = "double", tau.eq = F, npd = F, ...)

Arguments

model

A lavaan syntax model with extension. The notation ":" implies interaction between two variables (see Example).

data

The dataset for lavaan SEM.

center

Character. Whether single or double mean centering is used for the product indicator. Default is "double".

tau.eq

Logical. Specifies the type of reliability used to estimate error variance. If TRUE, Cronbach's alpha reliability is used. If FALSE, omega reliability is used. Default is FALSE.

npd

Logical. Specifies the type of input used in lavaan SEM. Default is FALSE for raw data or TRUE for a covariance matrix. Applying a covariance matrix can resolve problems of a non-positive definite covariance matrix. If TRUE, resilp should be used to obtain reliable inference.

...

Other parameters passed to the lavaan SEM function.#'

Value

An "Silp" class object.

Examples

n_obs = 100
corr = 0.1
effect = 0.12
ld = c(1,1,1,1)
alp = 0.9
data = generate_data(n_obs, corr, effect, ld, alp)
model = "
  fy =~ y1 + y2 + y3 + y4
  fx =~ x1 + x2 + x3 + x4
  fz =~ z1 + z2 + z3 + z4
  fy ~  fx + fz + fx:fz
"
silp(model, data)

silp documentation built on April 11, 2025, 6:18 p.m.

Related to silp in silp...