A+)-GT
Q1) If the regression model log(Y) ~ 𝑋1 + log (𝑋2) is implemented and the model summary is as
presented below, which of the following statement is always true?
Note: These are few formulas which might come handy in case you are not aware of log
operations.
Log(A) – Log(B) = Log(A/B)
Log(A) + Log(B) = Log (AB)
Exp(A+B) = Exp(A) * Exp(B)
Log(exp(A)) = A
Log(A) = B <==> A = Exp(B)
A. 1 unit increase in 𝑿𝟏 and 1% increase in 𝑿𝟐 leads to 114.9% increase in Y
B. 1% increase in 𝑋1 and 1 unit increase in 𝑋2 leads to 106% increase in Y
C. 1 unit increase in 𝑋1 and 1% increase in 𝑋2 leads to 76.5% increase in Y
D. 1% increase in 𝑋1and 1% increase in 𝑋2 leads to 87% increase in Y
,Solution:
ln(𝑌) = 𝑏0 + 𝑏1𝑋1 + 𝑏2 ln(𝑋2) ...........................................................𝑒𝑞(1)
If we increase 𝑋1 by 1 unit and 𝑋2 by 1% the new Y will be
ln(𝑌𝑛𝑒𝑤) = 𝑏0 + 𝑏1(𝑋1 + 1) + 𝑏2 ln(1.01𝑋2)
ln(𝑌𝑛𝑒𝑤) = 𝑏0 + 𝑏1𝑋1 + 𝑏1 + 𝑏2 ln(1.01) + 𝑏2ln (𝑋2) .................... 𝑒𝑞(2)
Subtracting equation 2 from equation 1 we have
ln(𝑌𝑛𝑒𝑤) − ln (𝑌) = 𝑏1 + 𝑏2ln (1.01)
ln(𝑌𝑛𝑒𝑤/𝑌) = 𝑏1 + 𝑏2ln (1.01)
𝑌𝑛𝑒𝑤/𝑌 = exp (𝑏𝑌1𝑛𝑒𝑤+ 𝑏2ln (1.01))
Return on Y = − 1 = exp (𝑏 + 𝑏 ln (1.01)) − 1 ..................𝑒𝑞(3)
𝑌 1 2
Plugging b1 = 0.754774, b2 = 1.029922 in equation 3 we have
Return on Y = exp(0.754774 + 1.029922 ∗ ln(1.01)) − 1 = 1.149
= 114.9%
Therefore for 1 unit increase in X1 and 1% increase in X2 we observe a 114.9% increase in Y.
Q2) Suppose we run a factor regression for a stock fund to see which factors explain its return
and get the following output:
Where RM-RF is the excess market return, SMB is the Size factor, HML is the Value factor,
RMW is the Robustness factor and CMA is the Conservative Factor.
, Looking at the output of regression, which factor can you say is almost redundant and
which factor explains that redundant factor most?
A. Robustness Factor (RMW) and Excess-Market return (RM-RF)
B. Value Factor (HML) and Conservative Factor (CMA)
C. Size Factor (SMB) and Value Factor (HML)
D. Conservative Factor (CMA) and Robustness Factor (RMW)
E. There is no redundant factor
Solution:
Value factor has the smallest magnitude of coefficient. Hence it has bare minimum effect on
the regression model. The factor that explains it most is Conservative Factor (CMA) with a
coefficient of 1.04 and t-stat of 23.
Instructions for Q3 and Q4
Please use the Facebook Ad dataset KAG_conversion_data_wrangled.csv for the next set of
questions. You should solve these questions using R (preferably using dplyr library wherever
applicable) after reviewing the code provided for Week 11 and other resources provided for
learning dplyr in R Learning Guide. Load the dataset as:
data <-
read.csv("KAG_conversion_data_wrangled.csv",stringsAsFactors =
FALSE)
Organic Impressions are ads that have generated impressions without any money spent on
them. (i.e. Spent = 0).
Q3)
Which campaign (campaign_id) has produced least number of ads with organic
impressions?
Answer: 1178
Code: data %>% filter(Spent == 0 & Impressions > 0) %>% group_by(campaign_id) %>%
summarise(n_ads = length(ad_id)) %>% arrange(n_ads)
Q4)
Among ads with organic impressions, which ad (ad_id) has the highest number of
impressions?
Answer: 1121094