Let \(G:\mathbb {R\rightarrow R}\) be a Borel function and \(m,m_{1}\in \mathbb {N}_{0}\) . In this paper, we investigate necessary and sufficient conditions on G such that \(\begin{aligned} \{G\circ f:f\in W_{p}^{m_{1}}(\mathbb {R}^{n},|\cdot |^{\alpha })\}\subset W_{p}^{m}(\mathbb {R}^{n},|\cdot |^{\alpha }) \end{aligned}\) holds with some suitable assumptions on \(m,m_{1},p\) and \(\alpha \) . As a corollary of our results, we obtain necessary and sufficient conditions for which such inclusion holds with \(G(t)=|t|^{\mu },\) \(G(t)=t|t|^{\mu -1},t\in \mathbb {R}\) , \(\mu >1\) and \(G\in \mathcal {D}(\mathbb {R}^{n})\) .