put (something) down to (something else)
To regard a situation, action, or outcome as being the result of some specific aspect, condition, or event. The runner put her leg pain down to simple muscle fatigue, but she was shocked to learn that it was due to deep vein thrombosis. I put most of my success down to the excellent teaching I received in secondary school.
put something down to something
and set something down to somethingto explain something as being caused by something else. I put his bad humor down to his illness. We set your failure down to your emotional upset.