OLS {inet} | R Documentation |
Estimate GMM via nodewise regression and hypothesis tests.
Description
Estimate Gaussian Graphical Model with nodewise regression, selecting edges with standard hypothesis tests and the Bonferroni-Holm Correction.
Usage
OLS(data, pbar = TRUE, correction = TRUE,
ci.level = 0.95, rulereg = "and")
Arguments
data |
An n x p matrix containing the data, where n are cases and p are variables |
pbar |
If |
correction |
If |
ci.level |
Specifies the width of the confidence interval used for testing the null hypothesis that a parameter is different to zero. Defaults to |
rulereg |
Specifies how parameter estimates should be combined across nodewise regressions. The options are the AND-rule (requiring both estimates to be significant) or the OR-rule (only requiring one estimate to be significant). Defaults to |
Value
The function returns a list with the following entries:
est |
A p x p matrix with point estimates for all partial correlations |
est.signf |
A p x p matrix with point estimates for all partial correlations with non-significant partial correlations being thresholded to zero. |
signf |
A p x p matrix indicating for each partial correlation whether it is significantly different to zero. |
ci.lower |
A p x p matrix indicating the lower confidence interval for each partial correlation. |
ci.upper |
A p x p matrix indicating the upper confidence interval for each partial correlation. |
ints |
A p-vector of estimated intercepts. |
Author(s)
Jonas Haslbeck <jonashaslbeck@gmail.com>
References
Hochberg, Y., & Tamhane, A. C. (1987). Multiple comparison procedures. John Wiley & Sons, Inc..
Examples
# Toy example that runs relatively quickly
library(MASS)
p <- 5 # number of variables
data <- mvrnorm(n=100, mu=rep(0, p), Sigma = diag(p))
out <- OLS(data = data)
## Not run:
# Fit GGM to PTSD data
out <- OLS(data = ptsd_data)
## End(Not run)