# Interpretation of transformed variables in regression

I did a regression with a cube root transformation for the target. The question is, how should I interpret the betas.

Variables:

• cnt (target): Number of rented bikes (on a daily basis).

• temp: Temperature (normalized 0 to 1). But this is not really important in this case.

Example: Model without any transformation:

fit = lm(cnt~temp, data = d_ss)

summary(fit)

Coefficients:

Estimate Std. Error t value Pr(>|t|)
(Intercept)  -0.0356     3.4827   -0.01    0.992
temp        381.2949     6.5344   58.35   <2e-16 ***


Interpretation: If temperature increases by one unit the amount of rented bikes increases by 381.29.

--> y = -0.04 + 381.29*x

Example: Cube root transformation

fit_cr = lm(cnt^(1/3)~temp, data = d_ss)

summary(fit_cr)

Coefficients:

Estimate Std. Error t value Pr(>|t|)
(Intercept)  2.85580    0.03880   73.61   <2e-16 ***
temp         4.38866    0.07279   60.29   <2e-16 ***


Interpretation: If temperature increases by one unit the amount of rented bikes increases by 84.60 (4.38^3).

--> y^1/3 = 2.86 + 4.39*x

--> y = 2.86^3 + 4.39^3*x

--> y = 23.27 + 84.60*x

Is this the right way?

The problem is, if I use different or more complex transformations like this:

fit_comp = lm(cnt^(1/3)~log(temp) + sqrt(variable2) + variable3 , data = d_ss)


Then the retransformations are quite complicated. How can I handle these ones?

• Some of the discussion here will carry over to your question. – Glen_b Jul 7 '19 at 13:03
• @Glen_b: It seems to me that the outcome variable is a count - rather than it being analyzed within a linear regression framework, why not analyze it within the more appropriate Poisson regression framework, as explained in my answer? – Isabella Ghement Jul 7 '19 at 17:14
• @Isabella You're correct, it looks like it is a count, and yes, that's quite important for dealing with the situation for this specific user (more important than worrying about transformation). However, other people attempting cube root transformations of their own response will land here and may benefit from the discussion link. Indeed, from OP's comments under your answer, it may still be relevant for the OP. – Glen_b Jul 8 '19 at 3:44

It is misleading to call your outcome (or target) variable amount of rented bikes, since the amount terminology implies that the outcome variable is continuous.

In fact, your outcome variable is a count variable so the more appropriate definition would be number of rented bikes.

The appropriate regression model for a count variable is Poisson regression (though you may need to worry about over- or under- dispersion being an issue; or perhaps you may need to worry about an excessive number of 0 counts in your data).

Using Poisson regression would preclude transforming the outcome variable and ending up with a model whose interpretation may be challenging.

The R command for fitting a Poisson regression model is:

glm(cnt ~ temp, family = poisson, data = d_ss)


This model essentially says that:

$$log$$(expected value of cnt) = $$\beta_0 + \beta_1*temp$$.

If you exponentiate the estimated value of $$\beta_1$$ you will find the multiplicative factor $$f$$ by which the expected value of cnt changes when temp increases by 1 unit. For example, if $$f=1.2$$, then the expected value of cnt increases by 20% for each 1-unit increase in temp, since (f-1)x100%= 20%. On the other hand, if $$f=0.8$$, then the expected value of cnt decreases by 20% for each 1-unit increase in temp, since (f-1)x100% = -20%. Here, f is the exponentiated value of the estimated coefficient of temp in the Poisson regression model.

You don't explain wherher your counts of rented bikes are collected over the same time period (e.g., a day, a month) or over different time periods. If the counts are collected over differing time periods, the glm() function has an offset option which allows you to adjust your modelling results accordingly.

• Thanks for your reply. My question was not so much on the data, but more on the interpretation of the transformation. However, your right, the number of rented bikes is not a metric variable. Poisson regression would be the right method. The number of rented bikes is measured on a daily basis. So, I think there is no need to use the offset option since there are no missings/gaps in the time period. But I am still not sure how to interpret the betas. – Banjo Jul 7 '19 at 19:39
• Are you referring to the interpretation of the betas from the Poisson regression? My point is that you are chasing after something which is an inappropriate way to model your data. – Isabella Ghement Jul 7 '19 at 20:11
• Yes, the transformed betas. – Banjo Jul 7 '19 at 20:17
• See my revised answer. There may be some issues with temporal correlation if your counts are assessed daily. – Isabella Ghement Jul 7 '19 at 20:28