The double ramification hierarchy is a new integrable hierarchy of Hamiltonian PDEs introduced recently by the first author. It is associated to an arbitrary given cohomological field theory. In this paper we study the double ramification hierarchy associated to the cohomological field theory formed by Witten's r-spin classes. Using the formula for the product of the top Chern class of the Hodge bundle with Witten's class, found by the second author, we present an effective method for a computation of the double ramification hierarchy. We do explicit computations for r=3,4,5 and prove that the double ramification hierarchy is Miura equivalent to the corresponding Dubrovin–Zhang hierarchy. As an application, this result together with a recent work of the first author with Paolo Rossi gives a quantization of the r-th Gelfand–Dickey hierarchy for r=3,4,5.