# Why are time-related covariates log transformed in modelling? [duplicate]

I have seen a lot of examples of transforming time-related variables (e.g., age, year, days, etc.), but I don't understand the reasoning behind doing this. I don't think it's for stabilizing the variance (because it is a covariate). I suppose it's because of something related to linearity. This is even more confusing when the transformed covariate is in a mixed model.

Why are temporal variables often log transformed?

• I don't think you have given enough context here. Otherwise put, this does not seem to differ notably from why are variables often log transformed and getting closer to linearity is perhaps top reason. The fact of being a covariate is immaterial here; for example, outliers and even skewness in covariates can be more difficult to handle than the opposite. May 28, 2013 at 0:31
• If this covariate is some continuous variables, it's easy to understand the reason (linrearize), e.g. we can use Box-Tidwell method, or polynomal fractional transformation. The main differrence here is "time-related" variable. I'm thinking about the nature of the time-related variables may have some characteristic like exposure variable in environment settings? May 28, 2013 at 9:56
• You are not adding enough detail to allow detailed comment, but if effects are nonlinear in time, transforming the time variable may well make sense. May 28, 2013 at 10:08
• I've seen a lot of time series log-transformed for interpretability reasons, as Graeme Walsh says in his answer. I've never heard of "year" being log transformed. Are you sure it's "year" that's being transformed and not a time series (say, GDP) that has a year associated with it? Jun 19, 2013 at 12:07

A common habit among economists is to take logs. Often times, this is done routinely or automatically without giving it much thought. It's true that taking logs can be used to, say, induce stable variance (see Luetkepohl & Xu, 2009) or to deal with outlying data, however, that's not necessarily the main reason behind taking logs.

The reason why many economists have developed this habit is simply for interpretability. Working in logs makes (some) models easier to interpret because a log transformed variable can be interpreted in terms of percentages or percentage change.

UCLA has a webpage with an example of this sort and there is a nice set of notes on logarithms in economics by Ron Mitchener.

Reference:

Helmut Luetkepohl & Fang Xu, 2009. "The Role of the Log Transformation in Forecasting Economic Variables," CESifo Working Paper Series 2591, CESifo Group Munich.

• I see nothing in the original question that restricts it to economics and nothing in this answer that addresses the time-related aspect, e.g. why would one log-transform years? (My own perception is that this is unusual; original poster never substantiated the claim any way.) Jun 19, 2013 at 11:46
• @NickCox I do, indeed, make reference to economics, but the main point is about interpretability and this is definitely not restricted to economics, nor was I suggesting that it was. At the UCLA link, one of the variables that's logged is "length of stay" and this is akin to the OP asking about "age" being transformed. True, I didn't address year and days, but my suspicion told me that the OP meant that these referred to the measure, not the variable itself; e.g. age in years, age in days, etc. If the OP confirms that this is not the case, I'd be happy enough to see the answer deleted. Jun 19, 2013 at 16:43
• This question is probably doomed, but despite that it would be very good if you could edit your answer to discuss the length of stay example, which I happily agree is pertinent to the original question. Jun 19, 2013 at 17:04
• @NickCox What's strange is that the OP says: "The main difference here is "time-related" variable. I'm thinking about the nature of the time-related variables may have some characteristic like exposure variable in environment settings?" My belief is that this comment by the OP means that he is talking about a variable that is measured on some time scale (again, age in years, x in days, y in minutes) and not time itself. How could time (year or days) be characterized as having exposure to the environment? It'd be nice to hear from the OP, but you're probably right that the question is doomed. Jun 19, 2013 at 17:24
• We're both guessing but time here may mean some duration in time. There are many natural phenomena that have been modelled as nonlinear functions of time, however: examples from chemistry, etc. Jun 19, 2013 at 17:27