LoslegenKostenlos loslegen

Making predictions

To improve pricing decisions, the marketing manager needs to know how many volume sales can be expected under alternative unit prices. In particular, he wants to know the expected volume sales for the unit prices of 1.05 and 0.95?

You can use the coefficients from your previously fitted linear sales response model to make these predictions. The coef() function returns a numeric coefficient vector with two elements: The first element is the sales intercept and the second element is the price slope of the linear.model object. You calculate the expected sales by simply adding the price slope multiplied by 1.05 and 0.95 to the sales intercept.

Diese Übung ist Teil des Kurses

Building Response Models in R

Kurs anzeigen

Anleitung zur Übung

  • Obtain the estimated coefficients from the linear.model object by using the function coef(). Extract the sales intercept and the price slope coefficients individually by numeric indexing.
  • Calculate the expected volume sales for the unit prices 1.05 and 0.95.

Interaktive Übung

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

# Obtain the intercept coefficient
coef(linear.model)[___]

# Obtain the slope coefficient
coef(linear.model)[___]

# Calculate the volume sales for the unit price of 1.05 
___(linear.model)[___] + ___ * ___(linear.model)[___]

# Calculate the volume sales for the unit price of 0.95 
___(___)[___] + ___ * ___(___)[___]
Code bearbeiten und ausführen