A Mathematical Framework for the Complex System Approach to Group Dynamics: The Case of Recovery House Social Integration.