OLS | R Documentation |
Estimate Gaussian Graphical Model with nodewise regression, selecting edges with standard hypothesis tests and the Bonferroni-Holm Correction.
OLS(data, pbar = TRUE, correction = TRUE, ci.level = 0.95, rulereg = "and")
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 |
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. |
Jonas Haslbeck <jonashaslbeck@gmail.com>
Hochberg, Y., & Tamhane, A. C. (1987). Multiple comparison procedures. John Wiley & Sons, Inc..
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.