get_wb_mod {fungible}R Documentation

Find an 'lm' model to use with the Wu & Browne (2015) model error method

Description

The Wu & Browne (2015) model error method takes advantage of the relationship between v and RMSEA:

Usage

get_wb_mod(mod, n = 50, values = 10, lower = 0.01, upper = 0.095)

Arguments

mod

A 'fungible::simFA()' model object.

n

The number of times to evaluate 'wb()' at each point.

values

The number of target RMSEA values to evaluate between 0.02 and 0.1.

lower

(scalar) The smallest target RMSEA value to use.

upper

(scalar) The largest target RMSEA value to use.

Details

v = RMSEA^2 + o(RMSEA^2).

As RMSEA increases, the approximation v ~= RMSEA^2 becomes worse. This function generates population correlation matrices with model error for multiple target RMSEA values and then regresses the target RMSEA values on the median observed RMSEA values for each target. The fitted model can then be used to predict a 'target_rmsea' value that will give solutions with RMSEA values that are close to the desired value.

Value

('lm' object) An 'lm' object to use with the wb function to obtain population correlation matrices with model error that have RMSEA values closer to the target RMSEA values. The 'lm' object will predict a 'target_rmsea' value that will give solutions with (median) RMSEA values close to the desired RMSEA value.

Examples

mod <- fungible::simFA(Seed = 42)
set.seed(42)
wb_mod <- get_wb_mod(mod)
noisemaker(mod, method = "WB", target_rmsea = 0.05, wb_mod = wb_mod)

[Package fungible version 2.4.4 Index]