model.matrix.polywog: Model matrix of a polywog model

Description Usage Arguments Details Value Author(s)

Description

Constructs the design matrix used to fit a polywog model, similar to model.matrix.lm.

Usage

1
2
## S3 method for class 'polywog'
model.matrix(object, type = c("raw", "expanded"), ...)

Arguments

object

a fitted model of class "polywog"

type

"raw", the default, returns the non-expanded model matrix with no intercept (same number of columns as object$polyTerms). "expanded" returns the polynomial expansion used in fitting (number of columns equals length(object$coefficients)).

...

other arguments to be passed to further methods (typically only used internally)

Details

There are two types of model matrix a user might want to construct. First, there is the matrix of the raw input terms that go into the eventual polynomial expansion. Such a matrix can be obtained by using type = "raw" (the default). The other form of the model matrix is the full polynomial expansion, where each column contains some power of the raw inputs. This can be obtained by using type = "expanded".

Value

The design matrix of the specified model, consisting either of raw terms or the full polynomial expansion depending on the type argument.

Author(s)

Brenton Kenkel and Curtis S. Signorino


brentonk/polywog-package documentation built on May 13, 2019, 5:10 a.m.