Learn R Programming

brainGraph (version 2.7.3)

GLMfit: Fit linear models for t contrasts

Description

brainGraph_GLM_fit_t fits a linear model for t-contrasts (i.e., uni-dimensional contrasts) and returns the contrasts of parameter estimates, standard errors, t-statistics, and p-values. If a contrast matrix is supplied, it will return the above values for each row of the matrix.

brainGraph_GLM_fit_f fits a linear model for f-contrasts (i.e., multi-dimensional contrasts) and returns the extra sum of squares due to the full model, the sum of squared errors of the full model, the f-statistic, and associated p-value.

Usage

brainGraph_GLM_fit_t(X, y, XtX, con.mat)

brainGraph_GLM_fit_f(X, y, dfR, con.mat, rkC, CXtX)

Arguments

X

Numeric matrix, if you wish to supply your own design matrix (default: NULL)

y

Numeric vector; the outcome variable

XtX

Numeric matrix

con.mat

Numeric matrix specifying the contrast(s) of interest; if only one contrast is desired, you can supply a vector

dfR

Integer; residual degrees of freedom

rkC

Integer; rank of the contrast matrix

CXtX

Numeric matrix

Value

brainGraph_GLM_fit_t - A list containing:

gamma

The contrast of parameter estimates

se

The standard error

brainGraph_GLM_fit_f - A list containing:

numer

The extra sum of squares due to the full model divided by the rank of the contrast matrix

se

The sum of squared errors of the full model

contrast

The contrast number; defaults to 1

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: GLMdesign, GLM, mtpc