Analyze Revenue Trends - Regression
Sometimes it is difficult to spot differences by simply eyeballing the data. A slightly more sophisticated tool to determine changes in the data is regression analysis. In this exercise, you will use regression analysis to determine whether the revenue trend has shifted between the historical period and the projection period. A statistically significant shift variable is not necessarily an indicator of bad projections, but it tells us that we may want to dig deeper to find a rationale for the shift in the trend. For this exercise, the data frame rev_all
which is stored in memory, contains the historical revenues (first 8 years) and projected revenues (last 5 years) under the rev_proj
variable name.
Note: A typical threshold for statistical significance is if the p-value of the trend variable is less than or equal to 0.10.
Este ejercicio forma parte del curso
Equity Valuation in R
Instrucciones del ejercicio
- Create a
trend
variable for historical and projected revenues. - Create a trend
shift
variable that identifies the projection period. - Regress revenue projections (
rev_proj
) on thetrend
andshift
variables, using therev_all
data. - Print the summary of
reg
.
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
# Create a trend variable
rev_all$trend <- ___
# Create shift variable
rev_all$shift <- ___
# Run regression
reg <- lm(___)
# Print regression summary
___