Q-analysis and the structure of friendship networks