Case-Study-1-Codes
Case-Study-1-Codes
Case-Study-1-Codes
2024-07-02
library(readxl)
#1.A) The coefficient of -0.0023 for Profit Margin (Profmarg) indicates that, holding all other variables
constant, a 1 unit increase in profit margin corresponds to a 0.23% decrease in the CEO’s salary under
Independent Variable 2. Similarly, for Independent Variable 3, a corresponding 1 unit increase in profit
margin leads to a 0.22% decrease in the CEO’s salary, with all other variables held constant.
#1.B) The z statistic for log market value is 0.112 divided by 0.05, which equals 2.24. Since this z value is
higher than the critical value of 1.96, it indicates that the market value has a significant impact.
#2(a)
## [1] 2017
##
## Call:
## lm(formula = nettfa ~ inc + age, data = single.house)
##
## Residuals:
## Min 1Q Median 3Q Max
## -179.95 -14.16 -3.42 6.03 1113.94
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -43.03981 4.08039 -10.548 <2e-16 ***
## inc 0.79932 0.05973 13.382 <2e-16 ***
## age 0.84266 0.09202 9.158 <2e-16 ***
## ---
1
## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
##
## Residual standard error: 44.68 on 2014 degrees of freedom
## Multiple R-squared: 0.1193, Adjusted R-squared: 0.1185
## F-statistic: 136.5 on 2 and 2014 DF, p-value: < 2.2e-16
#The statistically significant positive coefficient indicates that an increase in both age and income corre-
sponds to a rise in net financial wealth within the dataset, despite the coefficient’s modest magnitude.
#2(c)
##
## Call:
## lm(formula = nettfa ~ inc, data = single.house)
##
## Residuals:
## Min 1Q Median 3Q Max
## -185.12 -12.85 -4.85 1.78 1112.66
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -10.5709 2.0607 -5.13 3.18e-07 ***
## inc 0.8207 0.0609 13.48 < 2e-16 ***
## ---
## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
##
## Residual standard error: 45.59 on 2015 degrees of freedom
## Multiple R-squared: 0.08267, Adjusted R-squared: 0.08222
## F-statistic: 181.6 on 1 and 2015 DF, p-value: < 2.2e-16
#In contrast to part b, where both age and income were considered in the model, the estimated coefficient
in part c remains similar, suggesting a consistent relationship between income and net financial wealth.
However, the significant change in intercept indicates that age plays a crucial role in determining the baseline
level of net financial wealth. By focusing solely on income in part c, the model may overlook age-related
factors that contribute to variations in net financial wealth, thereby explaining the observed difference in
intercepts between the two models.
#IMPORT RETURN SHEET
#3(a)
##
## Call:
2
## lm(formula = return ~ dkr + eps + netinc + salary, data = returndata)
##
## Residuals:
## Min 1Q Median 3Q Max
## -88.629 -25.421 -4.215 18.326 124.627
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -14.370212 6.893616 -2.085 0.039 *
## dkr 0.320544 0.200911 1.595 0.113
## eps 0.042699 0.078138 0.546 0.586
## netinc -0.005109 0.004675 -1.093 0.276
## salary 0.003499 0.002194 1.595 0.113
## ---
## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
##
## Residual standard error: 39.19 on 137 degrees of freedom
## Multiple R-squared: 0.03948, Adjusted R-squared: 0.01143
## F-statistic: 1.408 on 4 and 137 DF, p-value: 0.2347
anova(model1)
##
3
## Call:
## lm(formula = return ~ dkr + eps + log(netinc) + log(salary),
## data = returndata)
##
## Residuals:
## Min 1Q Median 3Q Max
## -80.402 -26.729 -4.223 19.475 126.948
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -36.29933 39.37380 -0.922 0.358
## dkr 0.32658 0.20265 1.612 0.109
## eps 0.06854 0.08035 0.853 0.395
## log(netinc) -4.74530 3.38566 -1.402 0.163
## log(salary) 7.24181 6.31251 1.147 0.253
##
## Residual standard error: 39.32 on 137 degrees of freedom
## Multiple R-squared: 0.03304, Adjusted R-squared: 0.004812
## F-statistic: 1.17 on 4 and 137 DF, p-value: 0.3266
#The equation estimates return based on several factors: market value (dkr), earnings per share (eps),
logarithm of net income, and logarithm of salary.
#Return = -36.29 + 0.32dkr + 0.06eps -4.74 log(netinc) +7.24log(salary) #Std errors = (39.37),(0.2),(0.08),(3.38),(6.31)
#Below are the standard errors corresponding to each variable in the specified order.
#3(c)
anova(model2)
#In the second model, mirroring the findings of the first, none of the variables exhibit statistical significance
based on their F-values. This suggests that the relationships between these variables and the outcome
variable (return) are not strong enough to be considered meaningful. Specifically, the estimates for the debt
to capital ratio and salary are very close to zero, indicating little to no impact on the return. Moreover,
the negative coefficient for the logarithm of net income implies a potential inverse relationship with return,
though not statistically significant in this analysis.
#3.D)
#Given that none of the factors in either model demonstrate statistical significance, the predictability of
stock returns appears to be limited. The R-squared value indicates that less than 4% of the variation in
return can be attributed to changes in the independent variables included in the models. This suggests a
weak relationship between the predictors (market value, earnings per share, net income, salary, etc.) and
the outcome variable (return on investment). Consequently, the models may not adequately capture the
complex dynamics influencing stock returns, highlighting the need for further exploration or refinement of
variables to improve predictive accuracy.