Function to compute regression coefficients and their standard errors from univariate simple linear regression.

compute_univariate_sumstats(
  X,
  Y,
  standardize = FALSE,
  standardize.response = FALSE,
  mc.cores = 1
)

Arguments

X

n x p matrix of covariates.

Y

n x r matrix of responses.

standardize

If TRUE, X is "standardized" using the sample means and sample standard deviations.

standardize.response

If TRUE, Y is "standardized" using the sample means and sample standard deviations.

mc.cores

Number of cores to use. Parallelization is done over responses.

Value

A list with following elements:

Bhat

p x r matrix of the regression coeffcients.

Shat

p x r matrix of the standard errors for regression coeffcients.