modelString: Models to LaTeX Formula

Description Usage Arguments Value Examples

Description

Writes a model's equation in LaTeX. Supported classes are lm, arima, and garch

Usage

1
modelString(model, round_to = 2, dependent = "y")

Arguments

model

model to write out

round_to

integer: number of significant digits to round to

dependent

string: the dependent variable. Defaults to y

Value

A LaTeX formatted string

Examples

1
2
3
4
5
6
fit <- lm(mpg ~ hp + wt, data = mtcars)
modelString(fit, dependent = "mpg")

series <- c(1, 3, 2, 3, 4, 3, 4, 5, 6, 4, 5, 6, 5, 4, 7, 5, 4, 7, 8, 5, 7, 8, 9, 7, 9)
arimamodel <- forecast::auto.arima(series)
modelString(arimamodel)

grieman/grieman documentation built on May 17, 2019, 8:36 a.m.