int_spec | R Documentation |
Create an interaction specification for fixed parameters
int_spec(between, value, level = NULL, with_level = NULL)
between |
Character vector of length 2 specifying the two attributes to interact |
value |
Numeric. Interaction coefficient value |
level |
Character. For categorical variables, specific level of first attribute |
with_level |
Character. For categorical variables, specific level of second attribute |
An interaction specification list
# Continuous * continuous interaction
int_spec(between = c("price", "weight"), value = 0.1)
# Continuous * categorical interactions (must specify categorical level)
int_spec(between = c("price", "type"), with_level = "Fuji", value = 0.15)
int_spec(between = c("price", "type"), with_level = "Gala", value = 0.05)
# Categorical * categorical interactions (must specify both levels)
int_spec(between = c("type", "freshness"),
level = "Fuji", with_level = "Poor", value = -0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.