Skip to contents

Computes centered estimates of model parameters. This is relevant when there is an interaction term in the model, as the simple main effects depend upon the mean structure of the structural model. Currenlty only available for modsem_da and lavaan object. It is not relevant for the PI approaches (excluding the "pind" method, which is not recommended), since the indicators are centered before computing the product terms. The centering can be applied to observed variable interactions in lavaan models and latent interactions estimated using the sam function.

Usage

centered_estimates(object, ...)

# S3 method for class 'lavaan'
centered_estimates(
  object,
  monte.carlo = FALSE,
  mc.reps = 10000,
  tolerance.zero = 1e-10,
  ...
)

# S3 method for class 'modsem_da'
centered_estimates(
  object,
  monte.carlo = FALSE,
  mc.reps = 10000,
  tolerance.zero = 1e-10,
  ...
)

Arguments

object

An object of class modsem_da

...

Additional arguments passed to underlying methods. See specific method documentation for supported arguments, including:

monte.carlo

Logical. If TRUE, use Monte Carlo simulation to estimate standard errors; if FALSE, use the delta method (default).

mc.reps

Number of Monte Carlo repetitions. Default is 10000.

tolerance.zero

Threshold below which standard errors are set to NA.

Value

A data.frame with centered estimates in the est column.

Methods (by class)

  • centered_estimates(lavaan): Method for lavaan objects

  • centered_estimates(modsem_da): Method for modsem_da objects

Examples

m1 <- '
  # Outer Model
  X =~ x1 + x2 + x3
  Z =~ z1 + z2 + z3
  Y =~ y1 + y2 + y3

  # Inner Model
  Y ~ X + Z + X:Z
'
# \dontrun{
est_lms <- modsem(m1, oneInt, method = "lms")
centered_estimates(est_lms)
#>    lhs op rhs label   est std.error z.value p.value ci.lower ci.upper
#> 1    X =~  x1       1.000        NA      NA      NA       NA       NA
#> 2    X =~  x2       0.803     0.013  63.912       0    0.779    0.828
#> 3    X =~  x3       0.914     0.013  67.731       0    0.887    0.940
#> 4    Z =~  z1       1.000        NA      NA      NA       NA       NA
#> 5    Z =~  z2       0.810     0.012  65.091       0    0.786    0.835
#> 6    Z =~  z3       0.881     0.013  67.619       0    0.855    0.907
#> 7    Y =~  y1       1.000        NA      NA      NA       NA       NA
#> 8    Y =~  y2       0.798     0.007 107.545       0    0.784    0.813
#> 9    Y =~  y3       0.899     0.008 112.581       0    0.884    0.915
#> 10   Y  ~   X       0.672     0.031  21.664       0    0.612    0.733
#> 11   Y  ~   Z       0.570     0.030  18.749       0    0.510    0.629
#> 12   Y  ~ X:Z       0.718     0.028  25.838       0    0.664    0.773
#> 13  x1 ~~  x1       0.158     0.009  18.168       0    0.141    0.175
#> 14  x2 ~~  x2       0.162     0.007  23.163       0    0.148    0.176
#> 15  x3 ~~  x3       0.164     0.008  20.760       0    0.149    0.180
#> 16  z1 ~~  z1       0.167     0.009  18.503       0    0.149    0.184
#> 17  z2 ~~  z2       0.160     0.007  22.681       0    0.146    0.173
#> 18  z3 ~~  z3       0.158     0.008  20.779       0    0.143    0.173
#> 19  y1 ~~  y1       0.160     0.009  18.011       0    0.142    0.177
#> 20  y2 ~~  y2       0.154     0.007  22.687       0    0.141    0.168
#> 21  y3 ~~  y3       0.164     0.008  20.682       0    0.148    0.179
#> 22   X ~~   X       0.981     0.036  27.035       0    0.910    1.052
#> 23   X ~~   Z       0.200     0.024   8.244       0    0.152    0.248
#> 24   Z ~~   Z       1.018     0.038  26.933       0    0.944    1.092
#> 25   Y ~~   Y       0.980     0.038  25.938       0    0.906    1.054
#> 26 X:Z ~~ X:Z       1.038        NA      NA      NA       NA       NA
#> 27   X ~~ X:Z       0.000        NA      NA      NA       NA       NA
#> 28   Z ~~ X:Z       0.000        NA      NA      NA       NA       NA
# }