LoslegenKostenlos loslegen

Linearizing nonlinear functions

The microbrewery plans to expand their business and to offer Hoppiness nationwide. Therefore, pricing decisions need to be made by the manager for more than one store.

Stores might differ not only in location, but also in activity and in the number of volume sales. A solution is to explain the effect of changes in PRICE relative to changes in SALES. This is achieved by taking the log() of the SALES. The corresponding log(SALES) ~ PRICE relation is again estimated by the function lm() and the resulting nonlinear sales response model is investigated by its coefficients.

Diese Übung ist Teil des Kurses

Building Response Models in R

Kurs anzeigen

Anleitung zur Übung

  • Explain log(SALES) by PRICE. Use the function lm() and assign the result to an object called log.model.
  • Obtain the model coefficients of the log.model object by using the function coef().

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Explain log(SALES) by PRICE
log.model <- ___(___, data = sales.data)

# Obtain the model coefficients
Code bearbeiten und ausführen