There is a discrepancy in the limiting distributions of least-squares estimators for stationary and integrated variables. For statistical inference, it must be decided which distribution should be used in advance. This motivates us to develop a unifying inference procedure based on weighted estimation. The asymptotic distributions of the proposed estimators are developed and a random weighting bootstrap method is proposed for constructing confidence regions. The proposed method outperforms existing methods (with time constant or time-varying error variance) in simulations. We further study the predictability of asset returns in a setting where some of our state variables are endogenous.