Cointegration and error correction models are used to analyze the relationship between non-stationary time series variables. The Dickey-Fuller test determines if variables contain a unit root and are non-stationary. If two non-stationary variables have a stationary linear combination, they are cointegrated, indicating a long-run equilibrium relationship. An error correction model represents the short-run dynamic adjustment between cointegrated variables back to their long-run equilibrium when shocked.