ComeçarComece de graça

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.

Este exercício faz parte do curso

Building Response Models in R

Ver curso

Instruções do exercício

  • 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.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# 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 
___(___)[___] + ___ * ___(___)[___]
Editar e executar o código