The gmara in Kiddushin 30a (according to the second opinion in Rashi) suggests the proper time to chastise and thus teach a child is from 16-22 or 18-24.
'children' in this age range find themselves away from home in what may be a religiously hostile environment.