Description Usage Arguments Details Value Examples
get a list of model vars with their corresponding coeff vars or raw vars.
1 | get_model_pair(model, data = NULL, pair_with = c("coeff", "raw"))
|
model |
a lm or glm output |
data |
NULL (default) or data.frame, a new dataset to evaluate the categorical variables. If NULL, then use the data used in model itself. |
pair_with |
either 'raw' (default) or 'coeff', to decide the elements of list are raw vars or coeff vars.
See |
get a list of model vars with their corresponding coeff vars or raw vars.
See get_x
for the meaning of model var, coeff var and raw var.
a list with names as model vars and elements as their corresponding coeff/raw vars
1 2 3 4 5 6 7 8 | # return coeff
get_model_pair(model = price~ I(carat^2) + cut + carat*table, data = ggplot2::diamonds)
# return raw vars
get_model_pair(price~ I(carat^2) + cut + carat*table, data= ggplot2::diamonds, pair_with = 'raw')
# correctly deal with irregular formulas
model_dirty = lm(price~ I(carat^ 2) + cut - carat:table - cut ,ggplot2::diamonds)
get_model_pair(model_dirty,pair_with = 'raw')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.