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.
Diese Übung ist Teil des Kurses
Equity Valuation in R
Anleitung zur Übung
- Create a
trendvariable for historical and projected revenues. - Create a trend
shiftvariable that identifies the projection period. - Regress revenue projections (
rev_proj) on thetrendandshiftvariables, using therev_alldata. - Print the summary of
reg.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Create a trend variable
rev_all$trend <- ___
# Create shift variable
rev_all$shift <- ___
# Run regression
reg <- lm(___)
# Print regression summary
___