
Extract All Coefficient Types from Cross-Price Demand Models
Source:R/cp-methods.R
extract_coefficients.RdA convenience function to extract coefficients from any type of cross-price demand model in a unified format. For mixed effects models, returns a list with different coefficient types.
Value
For cp_model_nls and cp_model_lm, returns the model coefficients. For cp_model_lmer, returns a list with fixed, random, and combined coefficients.
Examples
# \donttest{
data(etm, package = "beezdemand")
fit <- fit_cp_nls(etm, equation = "exponentiated")
extract_coefficients(fit)
#> log10_qalone I log10_beta
#> 0.7430960 -1.1581172 -0.5463001
# }