Learn R Programming

BGGM (version 2.1.5)

coef.explore: Compute Regression Parameters for explore Objects

Description

There is a direct correspondence between the inverse covariance matrix and multiple regression kwan2014regression,Stephens1998BGGM. This readily allows for converting the GGM parameters to regression coefficients. All data types are supported.

Usage

# S3 method for explore
coef(object, iter = NULL, progress = TRUE, ...)

Value

An object of class coef, containting two lists.

  • betas A list of length p, each containing a p - 1 by iter matrix of posterior samples

  • object An object of class explore (the fitted model).

Arguments

object

An Object of class explore.

iter

Number of iterations (posterior samples; defaults to the number in the object).

progress

Logical. Should a progress bar be included (defaults to TRUE) ?

...

Currently ignored.

References

Examples

Run this code
# \donttest{
# note: iter = 250 for demonstrative purposes

# data
Y <- ptsd[,1:4]

##########################
### example 1: ordinal ###
##########################

# fit model (note + 1, due to zeros)
fit <- explore(Y + 1,
               type = "ordinal",
               iter = 250,
               progress = FALSE,
               seed = 1234)

# summarize the partial correlations
reg <- coef(fit, progress = FALSE)

# summary
summ <- summary(reg)

summ
# }

Run the code above in your browser using DataLab