makeRestrictionsLavFriendly: makeRestrictionsLavFriendly

View source: R/helperFunctions.R

makeRestrictionsLavFriendlyR Documentation

makeRestrictionsLavFriendly

Description

This function is currently orphaned, but we keep it just in case.

Usage

makeRestrictionsLavFriendly(model)

Arguments

model

lavaan model string

Details

This function transforms a lavaan model string into a model string that works reliably when both equality constrains and value constrains are imposed on the same parameters. lavaan cannot reliably handle this case, e. g., "a == b \\n a == 0" will not always work. The solution is to drop the equality constraint and rather apply the value constraint on each equality constrained parameter, e. g. "a == 0 \n b == 0" will work.

Value

model with lavaan-friendly constrains


semPower documentation built on Sept. 30, 2024, 9:24 a.m.