overparametrized_model.matrix: Obtain overparametrized design matrix

Description Usage Arguments Author(s) Examples

Description

This functions takes a formula and data frame and creates a design matrix that has a column for every level of every factor.

Usage

1
2
overparametrized_model.matrix(formula, data, remove.constant = TRUE,
  intercept = TRUE)

Arguments

formula

Righ hand side of formula for which a design matrix is desired.

data

data.frame containing the variables used in the formula

remove.constant

Logical indicating whether columns that never vary should be removed. Most commonly these are due to specific combinations of factors that never happen on the dataset.

intercept

Logical indicating whether or not to add an intercept

Author(s)

Sur from Dangl lab

Examples

1
2
3
4
5
data(Rhizo.map)

X <- overparametrized_model.matrix(~ fraction * accession,
                                   data = Rhizo.map)
image(X)

surh/AMORglmnet documentation built on May 30, 2019, 8:41 p.m.