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, ...)Value
A dataframe containing the summarized posterior distributions, including both the partial correlations and the regression coefficients.
pcor_resultsA data frame including the summarized partial correlationsbeta_resultsA list containing the summarized regression coefficients (one data frame for each outcome)
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.172 0.100 -0.371 0.019
#> interested--excited 0.382 0.094 0.192 0.554
#> disinterested--excited -0.172 0.101 -0.358 0.035
#> interested--upset -0.209 0.101 -0.404 -0.013
#> disinterested--upset -0.037 0.101 -0.232 0.162
#> excited--upset -0.110 0.107 -0.310 0.108
#> interested--strong 0.330 0.091 0.146 0.497
#> disinterested--strong 0.088 0.102 -0.118 0.274
#> excited--strong 0.485 0.080 0.311 0.630
#> upset--strong 0.089 0.110 -0.127 0.295
#> interested--stressed 0.279 0.095 0.086 0.455
#> disinterested--stressed 0.155 0.100 -0.056 0.345
#> excited--stressed -0.175 0.102 -0.374 0.029
#> upset--stressed 0.356 0.092 0.166 0.520
#> strong--stressed -0.006 0.107 -0.211 0.208
#> interested--steps 0.088 0.108 -0.119 0.289
#> disinterested--steps -0.067 0.109 -0.271 0.154
#> excited--steps -0.010 0.110 -0.229 0.200
#> upset--steps -0.038 0.106 -0.258 0.160
#> strong--steps 0.174 0.100 -0.015 0.362
#> stressed--steps -0.028 0.109 -0.246 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.222 0.179 -0.147 0.571
#> disinterested.l1 -0.049 0.122 -0.284 0.194
#> excited.l1 -0.084 0.194 -0.464 0.303
#> upset.l1 -0.155 0.130 -0.412 0.098
#> strong.l1 0.027 0.173 -0.319 0.369
#> stressed.l1 -0.018 0.121 -0.256 0.218
#> steps.l1 -0.156 0.114 -0.379 0.067
#> ---
#> disinterested
#>
#> Relation Post.mean Post.sd Cred.lb Cred.ub
#> interested.l1 -0.015 0.181 -0.372 0.338
#> disinterested.l1 -0.002 0.122 -0.244 0.237
#> excited.l1 -0.180 0.196 -0.566 0.201
#> upset.l1 0.255 0.128 -0.001 0.506
#> strong.l1 0.170 0.175 -0.166 0.505
#> stressed.l1 -0.010 0.120 -0.245 0.226
#> steps.l1 0.183 0.114 -0.039 0.408
#> ---
#> excited
#>
#> Relation Post.mean Post.sd Cred.lb Cred.ub
#> interested.l1 0.178 0.184 -0.175 0.542
#> disinterested.l1 0.056 0.125 -0.189 0.297
#> excited.l1 0.006 0.200 -0.383 0.402
#> upset.l1 -0.094 0.134 -0.358 0.172
#> strong.l1 0.025 0.179 -0.335 0.376
#> stressed.l1 -0.033 0.122 -0.271 0.203
#> steps.l1 -0.209 0.116 -0.438 0.023
#> ---
#> upset
#>
#> Relation Post.mean Post.sd Cred.lb Cred.ub
#> interested.l1 -0.096 0.174 -0.435 0.242
#> disinterested.l1 -0.019 0.115 -0.247 0.206
#> excited.l1 0.050 0.186 -0.307 0.410
#> upset.l1 0.427 0.122 0.190 0.668
#> strong.l1 0.048 0.169 -0.284 0.389
#> stressed.l1 -0.043 0.114 -0.264 0.177
#> steps.l1 0.150 0.109 -0.066 0.364
#> ---
#> strong
#>
#> Relation Post.mean Post.sd Cred.lb Cred.ub
#> interested.l1 0.172 0.184 -0.194 0.527
#> disinterested.l1 0.051 0.125 -0.199 0.295
#> excited.l1 -0.082 0.199 -0.468 0.303
#> upset.l1 0.058 0.133 -0.202 0.322
#> strong.l1 0.184 0.180 -0.172 0.540
#> stressed.l1 -0.076 0.124 -0.316 0.169
#> steps.l1 -0.093 0.116 -0.317 0.135
#> ---
#> stressed
#>
#> Relation Post.mean Post.sd Cred.lb Cred.ub
#> interested.l1 0.011 0.170 -0.333 0.338
#> disinterested.l1 0.091 0.116 -0.132 0.323
#> excited.l1 0.089 0.185 -0.274 0.454
#> upset.l1 0.312 0.122 0.076 0.555
#> strong.l1 -0.067 0.168 -0.385 0.259
#> stressed.l1 0.155 0.116 -0.075 0.385
#> steps.l1 0.202 0.107 -0.010 0.410
#> ---
#> steps
#>
#> Relation Post.mean Post.sd Cred.lb Cred.ub
#> interested.l1 0.110 0.184 -0.247 0.472
#> disinterested.l1 -0.022 0.125 -0.268 0.223
#> excited.l1 0.101 0.199 -0.299 0.490
#> upset.l1 -0.092 0.133 -0.349 0.169
#> strong.l1 -0.186 0.179 -0.538 0.165
#> stressed.l1 0.129 0.124 -0.111 0.374
#> steps.l1 0.039 0.117 -0.194 0.270
#> ---
# }
