Learn R Programming

brainGraph (version 1.0.0)

brainGraph_GLM_fit: Fit linear models and calculate statistics

Description

This function is partly a wrapper for fastLmPure, fitting a linear model and return the contrast of parameter estimates, standard error, t-statistic, and p-value (given a contrast of interest).

Usage

brainGraph_GLM_fit(X, y, con.vec, alpha = 0.05, alternative = c("two.sided",
  "less", "greater"))

Arguments

X
The design matrix
y
Numeric vector of the outcome variable
con.vec
Numeric vector of the contrast of interest
alpha
Numeric; the significance level (default: 0.05)
alternative
Character string for the alternative hypothesis (default: 'two.sided')

Value

A list containing:
gamma
The contrast of parameter estimates
se
The standard error
t.stat
The t-statistic
p.val
The p-value
ci.low
The lower confidence limit
ci.high
The upper confidence limit

Details

For speed purposes (if it is called from brainGraph_GLM and permutation testing is done), this function does not do argument checking.

See Also

Other GLM functions: brainGraph_GLM_design, brainGraph_GLM