Learn R Programming

equatiomatic (version 0.1.0)

create_eq.default: Create the full equation

Description

Create the full equation

Usage

# S3 method for default
create_eq(
  lhs,
  rhs,
  ital_vars,
  use_coefs,
  coef_digits,
  fix_signs,
  model,
  intercept,
  greek,
  raw_tex
)

Arguments

lhs

A character string of the left-hand side variable extracted with extract_lhs

rhs

A data frame of right-hand side variables extracted with extract_rhs.

ital_vars

Logical, defaults to FALSE. Should the variable names not be wrapped in the \operatorname{} command?

use_coefs

Logical, defaults to FALSE. Should the actual model estimates be included in the equation instead of math symbols?

coef_digits

Integer, defaults to 2. The number of decimal places to round to when displaying model estimates.

fix_signs

Logical, defaults to FALSE. If disabled, coefficient estimates that are negative are preceded with a "+" (e.g. 5(x) + -3(z)). If enabled, the "+ -" is replaced with a "-" (e.g. 5(x) - 3(z)).

model

A fitted model

intercept

How should the intercept be displayed? Default is "alpha", but can also accept "beta", in which case the it will be displayed as beta zero.

greek

What notation should be used for coefficients? Currently only accepts "beta" (with plans for future development). Can be used in combination with raw_tex to use any notation, e.g., "\hat{\beta}".

raw_tex

Logical. Is the greek code being passed to denote coefficients raw tex code?