biglm: Linear Regression for "matter" Matrices

biglmR Documentation

Linear Regression for “matter” Matrices

Description

This method allows bounded memory linear regression with matter_mat and sparse_mat matrices using the “biglm” package.

Usage

## S4 method for signature 'formula,matter_mat'
bigglm(formula, data, ..., nchunks = NA, verbose = NA)

## S4 method for signature 'formula,sparse_mat'
bigglm(formula, data, ..., nchunks = NA, verbose = NA)

Arguments

formula

A model formula.

data

A matter matrix with column names.

nchunks

The number of chunks to use. If NA (the default), this is taken from getOption("matter.default.nchunks"). For IO-bound operations, using fewer chunks will often be faster, but use more memory.

verbose

Should user messages be printed with the current chunk being processed? If NA (the default), this is taken from getOption("matter.default.verbose").

...

Additional options passed to bigglm.

Value

An object of class bigglm.

Author(s)

Kylie A. Bemis

See Also

bigglm

Examples

set.seed(1)

x <- matter_mat(rnorm(1000), nrow=100, ncol=10)

colnames(x) <- c(paste0("x", 1:9), "y")

fm <- paste0("y ~ ", paste0(paste0("x", 1:9), collapse=" + "))
fm <- as.formula(fm)

fit <- bigglm(fm, x, nchunks=10)
coef(fit)

kuwisdelu/matter documentation built on May 1, 2024, 5:17 a.m.