estimate_lavaan_ten_berge: seminr estimate_lavaan_ten_berge() function In seminr: Building and Estimating Structural Equation Models

 estimate_lavaan_ten_berge R Documentation

seminr estimate_lavaan_ten_berge() function

Description

Estimates factor scores using ten Berge method for a fitted Lavaan model

Usage

```estimate_lavaan_ten_berge(fit)
```

Arguments

 `fit` A fitted `lavaan` object – can be extracted from cbesem estimation or from using Lavaan directly.

Value

A list with two elements: ten berge scores; weights for calculating scores

Examples

```#' #seminr syntax for creating measurement model
mobi_mm <- constructs(
reflective("Image",        multi_items("IMAG", 1:5)),
reflective("Quality",      multi_items("PERQ", 1:7)),
reflective("Value",        multi_items("PERV", 1:2)),
reflective("Satisfaction", multi_items("CUSA", 1:3)),
reflective("Complaints",   single_item("CUSCO")),
reflective("Loyalty",      multi_items("CUSL", 1:3))
)

mobi_am <- associations(
item_errors(c("PERQ1", "PERQ2"), "IMAG1")
)

#seminr syntax for creating structural model
mobi_sm <- relationships(
paths(from = c("Image", "Quality"), to = c("Value", "Satisfaction")),
paths(from = c("Value", "Satisfaction"), to = c("Complaints", "Loyalty")),
paths(from = "Complaints",   to = "Loyalty")
)

# Estimate model and get results
cbsem <- estimate_cbsem(mobi, mobi_mm, mobi_sm, mobi_am)
tb <- estimate_lavaan_ten_berge(cbsem\$lavaan_output)
tb\$scores
tb\$weights

```

seminr documentation built on Oct. 13, 2022, 1:05 a.m.