I want to run a regression of money spent on links clicked using a data set where I notice link clicks level off after a certain amount of money spent. I want to use a log transformation to better fit this leveling-off data.
My data set looks like this:
link.clicks
[1] 34 60 54 49 63 100
MoneySpent
[1] 10.97 21.81 20.64 21.42 48.03 127.30
I want to predict the % change in link.clicks
from a $1 increase in MoneySpent
. My regression model is:
regClicksLogLevel <- lm(log(link.clicks) ~ (MoneySpent), data = TwtrData)
summary(regClicksLogLevel)
visreg(regClicksLogLevel)
However, The graph visreg
generates looks like this:
[1]: https://i.stack.imgur.com/eZqVG.png
When I change my regression to:
regClicksLogLog <- lm(log(link.clicks) ~ log(MoneySpent), data = TwtrData)
summary(regClicksLogLog)
visreg(regClicksLogLog)
I actually get the fitted line I'm looking for: [2]: https://i.stack.imgur.com/MexwC.png
I'm confused because I'm not trying to predict a % change in link.clicks
from a % change in MoneySpent
.
I'm trying to predict a % change in link.clicks
from a $ unit change in MoneySpent
.
Why can't I generate the 2nd graph using the my first regression, regClicksLogLevel
?
I guess that's what you are looking for
output
And here is the graph