coef.lav_betaselect {betaselectr} | R 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
|
drop_na |
Logical. Whether betas-select
with |
... |
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
Examples
library(lavaan)
# Need to mean-center iv and mod
data_test_medmod$iv <- data_test_medmod$iv - mean(data_test_medmod$iv)
data_test_medmod$mod <- data_test_medmod$mod - mean(data_test_medmod$mod)
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)
[Package betaselectr version 0.1.2 Index]