In OLS, while using log-log and linear-log transforamtions, is valid to transform some regressors only? In OLS I was wondering if it is valid to log-transform some regressors only. Specifically, continuous regressors, because it is advised not to transform binary or categorical variables.
For instance, let us assume that  $X_1$ and $X_2$ are continuous regressors, would be valid to define these models:
$y=\alpha +\beta_1log(X_1)+ \beta_2X_2+\epsilon$
or 
$log(y)=\alpha +\beta_1log(X_1)+ \beta_2X_2+\epsilon$
or alternative would be necessary to transform completely the right-hand side.
$y=\alpha +\beta_1log(X_1)+ \beta_2log(X_2)+\epsilon$
or 
$log(y)=\alpha +\beta_1log(X_1)+ \beta_2log(X_2)+\epsilon$
$ $
 A: If you want your linear regression model to behave properly, then you may be required to transform only some of your regressors. In linear modeling you are trying to capture a linear relationship between a (potentially transformed) outcome variable and a set of (potentially transformed) regressors. So if the true relationship between your outcome and your regressors is of the form shown in your first example, it would be wrong not to log-transform $X_1$ and it would be wrong to log-transform $X_2$.
You don't typically, however, know the true form of the relationship to start. Thus you usually need to try different transformations and see which ones bring you closest to a linear relationship. Your analysis is then based on data-dependent choices of transformations, so the assumptions underlying statistical significance tests of regression coefficients won't strictly hold.
A pedantic solution to this problem would be to insist on a prior choice of transformations before you even look at the data. That solves the p-value interpretation problem, but at the risk of missing the true relationships that the transformed data could demonstrate.
So, particularly in exploratory work, feel free to look for transformations that provide linearity regardless of how many regressors you end up transforming or what transformations you use. Just recognize that the p-values from a model built that way aren't going to be correct. In an ongoing research project, you can use the specific form of relationship you identified in your exploratory work to evaluate future data sets and thus obtain correct p-values in such later work.
