Skip to contents

Summarize the posterior distribution of each partial correlation and regression coefficient with the posterior mean, standard deviation, and credible intervals.

Usage

# S3 method for class 'var_estimate'
summary(object, cred = 0.95, ...)

Arguments

object

An object of class var_estimate

cred

Numeric. The credible interval width for summarizing the posterior distributions (defaults to 0.95; must be between 0 and 1).

...

Currently ignored.

Value

A dataframe containing the summarized posterior distributions, including both the partial correlations and the regression coefficients.

  • pcor_results A data frame including the summarized partial correlations

  • beta_results A list containing the summarized regression coefficients (one data frame for each outcome)

See also

Examples

# \donttest{
# data
Y <- subset(ifit, id == 1)[,-1]

# fit model with alias (var_estimate also works)
fit <- var_estimate(Y, progress = FALSE)

# summary ('pcor')
print(
summary(fit, cred = 0.95),
param = "pcor",
)
#> BGGM: Bayesian Gaussian Graphical Models 
#> --- 
#> Vector Autoregressive Model (VAR) 
#> --- 
#> Partial Correlations: 
#> 
#>                   Relation Post.mean Post.sd Cred.lb Cred.ub
#>  interested--disinterested    -0.177   0.097  -0.363   0.025
#>        interested--excited     0.381   0.095   0.157   0.542
#>     disinterested--excited    -0.181   0.099  -0.359   0.028
#>          interested--upset    -0.205   0.103  -0.401   0.001
#>       disinterested--upset    -0.044   0.106  -0.252   0.160
#>             excited--upset    -0.126   0.098  -0.305   0.079
#>         interested--strong     0.324   0.099   0.127   0.515
#>      disinterested--strong     0.105   0.101  -0.091   0.305
#>            excited--strong     0.501   0.081   0.340   0.651
#>              upset--strong     0.112   0.104  -0.088   0.319
#>       interested--stressed     0.259   0.100   0.052   0.443
#>    disinterested--stressed     0.150   0.101  -0.054   0.341
#>          excited--stressed    -0.167   0.103  -0.357   0.038
#>            upset--stressed     0.347   0.096   0.148   0.530
#>           strong--stressed    -0.008   0.107  -0.215   0.198
#>          interested--steps     0.082   0.098  -0.105   0.278
#>       disinterested--steps    -0.089   0.105  -0.303   0.117
#>             excited--steps    -0.013   0.099  -0.205   0.177
#>               upset--steps    -0.036   0.108  -0.231   0.189
#>              strong--steps     0.173   0.104  -0.041   0.370
#>            stressed--steps    -0.025   0.106  -0.221   0.186
#> --- 
#> 


# summary ('beta')
print(
summary(fit, cred = 0.95),
param = "beta",
)
#> BGGM: Bayesian Gaussian Graphical Models 
#> --- 
#> Vector Autoregressive Model (VAR) 
#> --- 
#> Coefficients: 
#> 
#> interested 
#> 
#>          Relation Post.mean Post.sd Cred.lb Cred.ub
#>     interested.l1     0.224   0.177  -0.119   0.575
#>  disinterested.l1    -0.049   0.122  -0.289   0.193
#>        excited.l1    -0.081   0.194  -0.462   0.309
#>          upset.l1    -0.152   0.128  -0.407   0.103
#>         strong.l1     0.024   0.175  -0.313   0.368
#>       stressed.l1    -0.020   0.120  -0.255   0.218
#>          steps.l1    -0.155   0.114  -0.377   0.068
#> ---
#> disinterested 
#> 
#>          Relation Post.mean Post.sd Cred.lb Cred.ub
#>     interested.l1    -0.017   0.176  -0.361   0.339
#>  disinterested.l1    -0.006   0.121  -0.242   0.229
#>        excited.l1    -0.181   0.195  -0.565   0.200
#>          upset.l1     0.256   0.128   0.005   0.506
#>         strong.l1     0.171   0.173  -0.162   0.516
#>       stressed.l1    -0.010   0.118  -0.244   0.219
#>          steps.l1     0.182   0.112  -0.037   0.398
#> ---
#> excited 
#> 
#>          Relation Post.mean Post.sd Cred.lb Cred.ub
#>     interested.l1     0.183   0.180  -0.171   0.536
#>  disinterested.l1     0.056   0.124  -0.190   0.299
#>        excited.l1    -0.001   0.199  -0.399   0.388
#>          upset.l1    -0.097   0.131  -0.356   0.162
#>         strong.l1     0.025   0.183  -0.331   0.389
#>       stressed.l1    -0.029   0.121  -0.269   0.211
#>          steps.l1    -0.207   0.117  -0.437   0.021
#> ---
#> upset 
#> 
#>          Relation Post.mean Post.sd Cred.lb Cred.ub
#>     interested.l1    -0.096   0.168  -0.419   0.241
#>  disinterested.l1    -0.016   0.117  -0.240   0.212
#>        excited.l1     0.054   0.185  -0.317   0.419
#>          upset.l1     0.429   0.123   0.188   0.680
#>         strong.l1     0.044   0.169  -0.284   0.376
#>       stressed.l1    -0.045   0.115  -0.270   0.177
#>          steps.l1     0.152   0.109  -0.065   0.364
#> ---
#> strong 
#> 
#>          Relation Post.mean Post.sd Cred.lb Cred.ub
#>     interested.l1     0.178   0.183  -0.180   0.532
#>  disinterested.l1     0.051   0.124  -0.188   0.299
#>        excited.l1    -0.088   0.199  -0.480   0.303
#>          upset.l1     0.056   0.131  -0.198   0.315
#>         strong.l1     0.183   0.180  -0.165   0.536
#>       stressed.l1    -0.074   0.124  -0.321   0.165
#>          steps.l1    -0.092   0.117  -0.325   0.137
#> ---
#> stressed 
#> 
#>          Relation Post.mean Post.sd Cred.lb Cred.ub
#>     interested.l1     0.015   0.170  -0.316   0.349
#>  disinterested.l1     0.088   0.116  -0.145   0.312
#>        excited.l1     0.089   0.188  -0.279   0.455
#>          upset.l1     0.318   0.125   0.069   0.561
#>         strong.l1    -0.068   0.170  -0.410   0.255
#>       stressed.l1     0.151   0.115  -0.074   0.377
#>          steps.l1     0.202   0.109  -0.011   0.411
#> ---
#> steps 
#> 
#>          Relation Post.mean Post.sd Cred.lb Cred.ub
#>     interested.l1     0.111   0.182  -0.239   0.460
#>  disinterested.l1    -0.021   0.124  -0.265   0.224
#>        excited.l1     0.098   0.200  -0.301   0.482
#>          upset.l1    -0.089   0.131  -0.341   0.167
#>         strong.l1    -0.184   0.177  -0.533   0.161
#>       stressed.l1     0.130   0.124  -0.117   0.375
#>          steps.l1     0.040   0.114  -0.182   0.268
#> ---

# }