coef.estimate {BGGM} | R Documentation |
Compute Regression Parameters for estimate
Objects
Description
There is a direct correspondence between the inverse covariance matrix and multiple regression (Kwan 2014; Stephens 1998). This readily allows for converting the GGM parameters to regression coefficients. All data types are supported.
Usage
## S3 method for class 'estimate'
coef(object, iter = NULL, progress = TRUE, ...)
Arguments
object |
An Object of class |
iter |
Number of iterations (posterior samples; defaults to the number in the object). |
progress |
Logical. Should a progress bar be included (defaults to |
... |
Currently ignored. |
Value
An object of class coef
, containting two lists.
-
betas
A list of length p, each containing a p - 1 byiter
matrix of posterior samples -
object
An object of classestimate
(the fitted model).
References
Kwan CC (2014).
“A regression-based interpretation of the inverse of the sample covariance matrix.”
Spreadsheets in Education, 7(1), 4613.
Stephens G (1998).
“On the Inverse of the Covariance Matrix in Portfolio Analysis.”
The Journal of Finance, 53(5), 1821–1827.
Examples
# note: iter = 250 for demonstrative purposes
#########################
### example 1: binary ###
#########################
# data
Y = matrix( rbinom(100, 1, .5), ncol=4)
# fit model
fit <- estimate(Y, type = "binary",
iter = 250,
progress = TRUE)
# summarize the partial correlations
reg <- coef(fit, progress = FALSE)
# summary
summ <- summary(reg)
summ