Plot a Cross-Price Demand Model (Nonlinear)
# S3 method for cp_model_nls
plot(
x,
data = NULL,
inv_fun = identity,
n_points = 100,
title = NULL,
xlab = "Price",
ylab = "Consumption",
x_trans = "identity",
y_trans = "identity",
point_size = 3,
inverse_fun = deprecated(),
...
)A ggplot2 object.
A cross-price model object from fit_cp_nls with return_all=TRUE.
Optional data frame with x and y; if NULL, uses object$data.
Optional function to inverse-transform predictions. Default is identity.
Number of points used for prediction curve.
Optional plot title.
X-axis label.
Y-axis label.
Transformation for x-axis: "identity", "log10", or "pseudo_log".
Transformation for y-axis: "identity", "log10", or "pseudo_log".
Size of data points.
Additional arguments (passed to predict).