coef.lav_betaselect: Coefficients of a 'lav_betaselect'-Class Object

View source: R/coef_lav_betaselect.R

coef.lav_betaselectR Documentation

Coefficients of a 'lav_betaselect'-Class Object

Description

Return the betas-select in a 'lav_betaselect'-class object.

Usage

## S3 method for class 'lav_betaselect'
coef(object, drop_na = FALSE, ...)

Arguments

object

The output of lav_betaselect().

drop_na

Logical. Whether betas-select with NA are dropped. Default is FALSE.

...

Optional arguments. Not used.

Details

It just extracts and returns the column est from the object: the betas-select, with selected variables standardized.

Value

A numeric vector: The betas-select in the object. The names of parameters follow the convention in lavaan.

Author(s)

Shu Fai Cheung https://orcid.org/0000-0002-9871-9448

See Also

lav_betaselect()

Examples


library(lavaan)
mod <-
"
med ~ iv + mod + iv:mod
dv ~ med + iv
"
fit <- sem(mod,
           data_test_medmod,
           fixed.x = TRUE)
summary(fit)
fit_beta <- lav_betaselect(fit,
                           to_standardize = c("iv", "dv"))
coef(fit_beta)


betaselectr documentation built on April 3, 2025, 8:51 p.m.