biglm: Using "biglm" with "matter"

Description Usage Arguments Value Author(s) See Also Examples

Description

This method allows matter_mat matrices and matter_df data frames to be used with the biglm and bigglm functions from the “biglm” package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'formula,virtual_df'
biglm(formula, data, weights = NULL, sandwich = FALSE)

## S4 method for signature 'formula,virtual_df'
bigglm(formula, data, ..., chunksize = NULL)

## S4 method for signature 'formula,matter_mat'
bigglm(formula, data, ..., chunksize = NULL, fc = NULL)

## S4 method for signature 'formula,sparse_mat'
bigglm(formula, data, ..., chunksize = NULL, fc = NULL)

## S4 method for signature 'formula,virtual_mat'
bigglm(formula, data, ..., chunksize = NULL, fc = NULL)

Arguments

formula

A model formula.

data

A matter matrix with column names.

weights

A one-sided, single-term formula specifying weights.

sandwich

If TRUE, compute the Huber/White sandwich covariance matrix (uses p^4 memory rather than p^2).

chunksize

An integer giving the maximum number of rows to process at a time. If left NULL, this will be calculated by dividing the chunksize of data by the number of variables in the formula.

fc

Either column indices or names of variables which are factors.

...

Additional options passed to bigglm.

Value

An object of class bigglm.

Author(s)

Kylie A. Bemis

See Also

bigglm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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, data=x, chunksize=50)
coef(fit)

Example output

Loading required package: biglm
Loading required package: DBI

Attaching package: 'matter'

The following objects are masked from 'package:base':

    apply, scale

(Intercept)          x1          x2          x3          x4          x5 
-0.03523360  0.11311493 -0.01989207 -0.19409195  0.08794120 -0.11345792 
         x6          x7          x8          x9 
-0.09366813 -0.08451424  0.05626240  0.19443693 

matter documentation built on Nov. 8, 2020, 6:15 p.m.