fit_cp_nls | R Documentation |
Fit Nonlinear Cross-Price Model using NLS
fit_cp_nls(
data,
equation = c("exponentiated", "exponential", "additive"),
start_vals = NULL,
iter = 100,
bounds = list(lower = c(qalone = 0.1, I = -2, beta = 1e-05), upper = c(qalone = NA, I =
2, beta = 5)),
fallback_to_nlsr = TRUE,
return_all = TRUE
)
data |
A data frame containing columns: x and y. |
equation |
Type of equation ("exponential" or "exponentiated"). |
start_vals |
Optional named list of starting values. |
iter |
Number of iterations for nls.multstart. |
bounds |
List with 'lower' and 'upper' bounds for parameters. |
fallback_to_nlsr |
Logical; if TRUE, try nlsr when others fail. |
return_all |
Logical; if TRUE, returns a list with model metadata. |
Fitted model object or list with model metadata.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.