All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
It is permissible for whoever misses the congregational prayer in the mosque to perform it with his wife and children (if any). This is better for him than performing the prayer alone. The Prophet said: "The congregational prayer is 27 times superior to that which is performed individually." [Al-Bukhari] Indeed the Prophet led a supererogatory prayer with Anas and his grandmother Maleekah, and Ishaaq, the son of his step-brother. So its permissibility in obligatory prayers is more appropriate. However, it should be noted that a man should not stay behind from performing congregational prayers in the mosque without a sound valid excuse, as the Prophet said: "I was about to order a man to lead the prayer (instead of me) then I would go to the people who do not come to join the congregational prayer, then I would order that fire be set to their homes." [Al-Bukhari and Muslim] Imaam Ash-Shaafi'ee said: 'I do not like that anyone would miss the congregational prayer in the mosque even if he performs the prayer with his wives, his slave, his mother or with some of his children.'
Allaah knows best.