Runs GLS regression on genetic parameters. Drop-in replacement for
GenomicSEM::summaryGLS(): returns a numeric matrix with
columns betas, pvals, SE, Z and row names b0, b1, ...
(intercept first when INTERCEPT = TRUE), and prints it before
returning.
Examples
# GLS regression of a synthetic response on two predictors.
Y <- c(0.50, 0.30, 0.20, 0.10)
V_Y <- diag(4) * 0.01
X <- matrix(c(1, 2, 3, 4,
0, 1, 0, 1), nrow = 4, ncol = 2)
fit <- summaryGLS(Y = Y, V_Y = V_Y, PREDICTORS = X, INTERCEPT = TRUE)
#> betas pvals SE Z
#> b0 0.600 9.633570e-07 0.1224745 4.8989795
#> b1 -0.125 1.241933e-02 0.0500000 -2.5000000
#> b2 -0.025 8.230633e-01 0.1118034 -0.2236068
fit # matrix with rows b0, b1, b2 and columns betas, pvals, SE, Z
#> betas pvals SE Z
#> b0 0.600 9.633570e-07 0.1224745 4.8989795
#> b1 -0.125 1.241933e-02 0.0500000 -2.5000000
#> b2 -0.025 8.230633e-01 0.1118034 -0.2236068