plot.cp_model_nls | R Documentation |
Plot a Cross-Price Demand Model (Nonlinear)
## S3 method for class 'cp_model_nls'
plot(
x,
data = NULL,
inverse_fun = NULL,
n_points = 100,
title = NULL,
xlab = "Price",
ylab = "Consumption",
x_trans = "identity",
y_trans = "identity",
point_size = 3,
...
)
x |
A cross-price model object from fit_cp_nls with return_all=TRUE. |
data |
Optional data frame with x and y; if NULL, uses object$data. |
inverse_fun |
Optional function to inverse-transform predictions. |
n_points |
Number of points used for prediction curve. |
title |
Optional plot title. |
xlab |
X-axis label. |
ylab |
Y-axis label. |
x_trans |
Transformation for x-axis: "identity", "log10", or "pseudo_log". |
y_trans |
Transformation for y-axis: "identity", "log10", or "pseudo_log". |
point_size |
Size of data points. |
... |
Additional arguments (passed to predict). |
A ggplot2 object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.