View source: R/tabularise.nls.R
equation.nls | R Documentation |
Create the model equation of several self-starting nonlinear models available in the stats package.
## S3 method for class 'nls'
equation(
object,
ital_vars = FALSE,
use_coefs = FALSE,
coef_digits = 2L,
fix_signs = TRUE,
var_names = NULL,
op_latex = c("\\cdot", "\\times"),
...
)
## S3 method for class 'summary.nls'
equation(
object,
ital_vars = FALSE,
use_coefs = FALSE,
coef_digits = 2L,
fix_signs = TRUE,
var_names = NULL,
op_latex = c("\\cdot", "\\times"),
...
)
object |
An nls or summary.nls object. |
ital_vars |
Logical, defaults to |
use_coefs |
Logical, defaults to |
coef_digits |
Integer, defaults to 2. The number of decimal places to
round to when displaying model estimates with |
fix_signs |
Logical, defaults to |
var_names |
A named character vector as |
op_latex |
The LaTeX product operator character to use in fancy
scientific notation, either |
... |
Additional arguments (not used yet). |
A character string with a LaTeX equation.
equation <- tabularise::equation
chick1 <- ChickWeight[ChickWeight$Chick == 1, ]
chick1_nls <- nls(data = chick1, weight ~ SSlogis(Time, Asym, xmid, scal))
summary(chick1_nls)
equation(chick1_nls)
equation(summary(chick1_nls))
chick1_nls2 <- nls(data = chick1,
weight ~ SSlogis(Time, Asym = A, xmid = x, scal = scale))
summary(chick1_nls2)
equation(chick1_nls2)
equation(summary(chick1_nls2))
equation(summary(chick1_nls2), var_names = c(
weight = "Body weight [gm]",
Time = "Number of days"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.