Skip to contents

Extract parameterEstimates from an estimated model

Usage

parameter_estimates(object, ...)

# S3 method for class 'lavaan'
parameter_estimates(
  object,
  colon.pi = NULL,
  high.order.as.measr = NULL,
  rm.tmp.ov = NULL,
  label.renamed.prod = NULL,
  is.public = NULL,
  ...
)

# S3 method for class 'modsem_da'
parameter_estimates(
  object,
  high.order.as.measr = TRUE,
  is.public = TRUE,
  rm.tmp.ov = is.public,
  label.renamed.prod = NULL,
  ...
)

# S3 method for class 'modsem_mplus'
parameter_estimates(
  object,
  colon.pi = NULL,
  high.order.as.measr = NULL,
  rm.tmp.ov = NULL,
  label.renamed.prod = NULL,
  is.public = NULL,
  ...
)

# S3 method for class 'modsem_pi'
parameter_estimates(
  object,
  colon.pi = FALSE,
  label.renamed.prod = FALSE,
  high.order.as.measr = NULL,
  rm.tmp.ov = NULL,
  is.public = NULL,
  ...
)

Arguments

object

An object of class modsem_pi, modsem_da, or modsem_mplus

...

Additional arguments passed to other functions

colon.pi

Should colons (:) be added to the interaction terms (E.g., `XZ` -> `X:Z`)?

high.order.as.measr

Should higher order measurement model be denoted with the =~ operator? If FALSE the ~ operator is used.

rm.tmp.ov

Should temporary (hidden) variables be removed?

label.renamed.prod

Should renamed product terms keep their old (implicit) labels?

is.public

Should public version of parameter table be returned? If FALSE, the internal version of the parameter table is returned.

Methods (by class)

  • parameter_estimates(lavaan): Get parameter estimates of a lavaan object

  • parameter_estimates(modsem_da): Get parameter estimates of a modsem_da object

  • parameter_estimates(modsem_mplus): Get parameter estimates of a modsem_mplus object

  • parameter_estimates(modsem_pi): Get parameter estimates of a modsem_pi object

Examples

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

  # Inner Model
  Y ~ X + Z + X:Z
'
# Double centering approach
est_dca <- modsem(m1, oneInt)

pars <- parameter_estimates(est_dca) # no correction

# Pretty summary
summarize_partable(pars)
#> modsem (version 1.0.16)
#> 
#>   Number of model parameters                        64
#>   Number of latent variables                         4
#>   Number of observed variables                      18
#>  
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X =~          
#>     x1              1.000      0.000                  
#>     x2              0.804      0.013   63.612    0.000
#>     x3              0.916      0.014   67.144    0.000
#>   Z =~          
#>     z1              1.000      0.000                  
#>     z2              0.812      0.013   64.763    0.000
#>     z3              0.882      0.013   67.014    0.000
#>   Y =~          
#>     y1              1.000      0.000                  
#>     y2              0.798      0.007  107.428    0.000
#>     y3              0.899      0.008  112.453    0.000
#>   XZ =~         
#>     x1z1            1.000      0.000                  
#>     x2z1            0.805      0.013   60.636    0.000
#>     x3z1            0.877      0.014   62.680    0.000
#>     x1z2            0.793      0.013   59.343    0.000
#>     x2z2            0.646      0.015   43.672    0.000
#>     x3z2            0.706      0.016   44.292    0.000
#>     x1z3            0.887      0.014   63.700    0.000
#>     x2z3            0.716      0.016   45.645    0.000
#>     x3z3            0.781      0.017   45.339    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.675      0.027   25.379    0.000
#>     Z               0.561      0.026   21.606    0.000
#>     XZ              0.702      0.027   26.360    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>  .x1z1 ~~       
#>    .x1z2            0.115      0.008   14.802    0.000
#>    .x1z3            0.114      0.008   13.947    0.000
#>    .x2z1            0.125      0.008   16.095    0.000
#>    .x3z1            0.140      0.009   16.135    0.000
#>  .x1z2 ~~       
#>    .x1z3            0.103      0.007   14.675    0.000
#>    .x2z2            0.128      0.006   20.850    0.000
#>    .x3z2            0.146      0.007   21.243    0.000
#>  .x1z3 ~~       
#>    .x2z3            0.116      0.007   17.818    0.000
#>    .x3z3            0.135      0.007   18.335    0.000
#>  .x2z1 ~~       
#>    .x2z2            0.135      0.006   20.905    0.000
#>    .x2z3            0.145      0.007   21.145    0.000
#>    .x3z1            0.114      0.007   16.058    0.000
#>  .x2z2 ~~       
#>    .x2z3            0.117      0.006   20.419    0.000
#>    .x3z2            0.116      0.006   20.586    0.000
#>  .x2z3 ~~       
#>    .x3z3            0.109      0.006   18.059    0.000
#>  .x3z1 ~~       
#>    .x3z2            0.138      0.007   19.331    0.000
#>    .x3z3            0.158      0.008   20.269    0.000
#>  .x3z2 ~~       
#>    .x3z3            0.131      0.007   19.958    0.000
#>   X ~~          
#>     Z               0.201      0.024    8.271    0.000
#>     XZ              0.016      0.025    0.628    0.530
#>   Z ~~          
#>     XZ              0.062      0.025    2.449    0.014
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .x1              0.160      0.009   17.871    0.000
#>    .x2              0.162      0.007   22.969    0.000
#>    .x3              0.163      0.008   20.161    0.000
#>    .z1              0.168      0.009   18.143    0.000
#>    .z2              0.158      0.007   22.264    0.000
#>    .z3              0.158      0.008   20.389    0.000
#>    .y1              0.159      0.009   17.896    0.000
#>    .y2              0.154      0.007   22.640    0.000
#>    .y3              0.164      0.008   20.698    0.000
#>    .x1z1            0.311      0.014   22.227    0.000
#>    .x2z1            0.292      0.011   27.287    0.000
#>    .x3z1            0.327      0.012   26.275    0.000
#>    .x1z2            0.290      0.011   26.910    0.000
#>    .x2z2            0.239      0.008   29.770    0.000
#>    .x3z2            0.270      0.009   29.117    0.000
#>    .x1z3            0.272      0.012   23.586    0.000
#>    .x2z3            0.245      0.009   27.979    0.000
#>    .x3z3            0.297      0.011   28.154    0.000
#>     X               0.981      0.036   26.895    0.000
#>     Z               1.016      0.038   26.856    0.000
#>    .Y               0.990      0.038   25.926    0.000
#>     XZ              1.045      0.044   24.004    0.000
#> 

# Only print the data.frame
pars
#>     lhs op  rhs   est    se       z pvalue ci.lower ci.upper
#> 1     X =~   x1 1.000 0.000      NA     NA    1.000    1.000
#> 2     X =~   x2 0.804 0.013  63.612  0.000    0.779    0.829
#> 3     X =~   x3 0.916 0.014  67.144  0.000    0.889    0.942
#> 4     Z =~   z1 1.000 0.000      NA     NA    1.000    1.000
#> 5     Z =~   z2 0.812 0.013  64.763  0.000    0.787    0.836
#> 6     Z =~   z3 0.882 0.013  67.014  0.000    0.856    0.908
#> 7     Y =~   y1 1.000 0.000      NA     NA    1.000    1.000
#> 8     Y =~   y2 0.798 0.007 107.428  0.000    0.784    0.813
#> 9     Y =~   y3 0.899 0.008 112.453  0.000    0.883    0.915
#> 10    Y  ~    X 0.675 0.027  25.379  0.000    0.622    0.727
#> 11    Y  ~    Z 0.561 0.026  21.606  0.000    0.510    0.612
#> 12    Y  ~   XZ 0.702 0.027  26.360  0.000    0.650    0.754
#> 13   XZ =~ x1z1 1.000 0.000      NA     NA    1.000    1.000
#> 14   XZ =~ x2z1 0.805 0.013  60.636  0.000    0.779    0.831
#> 15   XZ =~ x3z1 0.877 0.014  62.680  0.000    0.850    0.904
#> 16   XZ =~ x1z2 0.793 0.013  59.343  0.000    0.766    0.819
#> 17   XZ =~ x2z2 0.646 0.015  43.672  0.000    0.617    0.675
#> 18   XZ =~ x3z2 0.706 0.016  44.292  0.000    0.675    0.738
#> 19   XZ =~ x1z3 0.887 0.014  63.700  0.000    0.860    0.914
#> 20   XZ =~ x2z3 0.716 0.016  45.645  0.000    0.686    0.747
#> 21   XZ =~ x3z3 0.781 0.017  45.339  0.000    0.748    0.815
#> 22 x1z1 ~~ x1z2 0.115 0.008  14.802  0.000    0.100    0.131
#> 23 x1z1 ~~ x1z3 0.114 0.008  13.947  0.000    0.098    0.130
#> 24 x1z1 ~~ x2z1 0.125 0.008  16.095  0.000    0.110    0.140
#> 25 x1z1 ~~ x3z1 0.140 0.009  16.135  0.000    0.123    0.157
#> 26 x1z2 ~~ x1z3 0.103 0.007  14.675  0.000    0.089    0.117
#> 27 x1z2 ~~ x2z2 0.128 0.006  20.850  0.000    0.116    0.140
#> 28 x1z2 ~~ x3z2 0.146 0.007  21.243  0.000    0.132    0.159
#> 29 x1z3 ~~ x2z3 0.116 0.007  17.818  0.000    0.103    0.129
#> 30 x1z3 ~~ x3z3 0.135 0.007  18.335  0.000    0.120    0.149
#> 31 x2z1 ~~ x2z2 0.135 0.006  20.905  0.000    0.122    0.147
#> 32 x2z1 ~~ x2z3 0.145 0.007  21.145  0.000    0.131    0.158
#> 33 x2z1 ~~ x3z1 0.114 0.007  16.058  0.000    0.100    0.128
#> 34 x2z2 ~~ x2z3 0.117 0.006  20.419  0.000    0.106    0.129
#> 35 x2z2 ~~ x3z2 0.116 0.006  20.586  0.000    0.105    0.127
#> 36 x2z3 ~~ x3z3 0.109 0.006  18.059  0.000    0.097    0.121
#> 37 x3z1 ~~ x3z2 0.138 0.007  19.331  0.000    0.124    0.152
#> 38 x3z1 ~~ x3z3 0.158 0.008  20.269  0.000    0.143    0.173
#> 39 x3z2 ~~ x3z3 0.131 0.007  19.958  0.000    0.118    0.144
#> 40   x1 ~~   x1 0.160 0.009  17.871  0.000    0.142    0.177
#> 41   x2 ~~   x2 0.162 0.007  22.969  0.000    0.148    0.176
#> 42   x3 ~~   x3 0.163 0.008  20.161  0.000    0.147    0.179
#> 43   z1 ~~   z1 0.168 0.009  18.143  0.000    0.150    0.186
#> 44   z2 ~~   z2 0.158 0.007  22.264  0.000    0.144    0.172
#> 45   z3 ~~   z3 0.158 0.008  20.389  0.000    0.143    0.173
#> 46   y1 ~~   y1 0.159 0.009  17.896  0.000    0.142    0.177
#> 47   y2 ~~   y2 0.154 0.007  22.640  0.000    0.141    0.168
#> 48   y3 ~~   y3 0.164 0.008  20.698  0.000    0.148    0.179
#> 49 x1z1 ~~ x1z1 0.311 0.014  22.227  0.000    0.283    0.338
#> 50 x2z1 ~~ x2z1 0.292 0.011  27.287  0.000    0.271    0.313
#> 51 x3z1 ~~ x3z1 0.327 0.012  26.275  0.000    0.302    0.351
#> 52 x1z2 ~~ x1z2 0.290 0.011  26.910  0.000    0.269    0.311
#> 53 x2z2 ~~ x2z2 0.239 0.008  29.770  0.000    0.223    0.254
#> 54 x3z2 ~~ x3z2 0.270 0.009  29.117  0.000    0.252    0.288
#> 55 x1z3 ~~ x1z3 0.272 0.012  23.586  0.000    0.250    0.295
#> 56 x2z3 ~~ x2z3 0.245 0.009  27.979  0.000    0.228    0.262
#> 57 x3z3 ~~ x3z3 0.297 0.011  28.154  0.000    0.276    0.317
#> 58    X ~~    X 0.981 0.036  26.895  0.000    0.910    1.052
#> 59    Z ~~    Z 1.016 0.038  26.856  0.000    0.942    1.090
#> 60    Y ~~    Y 0.990 0.038  25.926  0.000    0.915    1.065
#> 61   XZ ~~   XZ 1.045 0.044  24.004  0.000    0.960    1.131
#> 62    X ~~    Z 0.201 0.024   8.271  0.000    0.153    0.249
#> 63    X ~~   XZ 0.016 0.025   0.628  0.530   -0.033    0.064
#> 64    Z ~~   XZ 0.062 0.025   2.449  0.014    0.012    0.112