# R Code for Chapter 6 of Interdisciplinary Handbook of PCT: Learning Curves and Psychological Change Across Populations

**URL:** <http://discourse.iapct.org/t/r-code-for-chapter-6-of-interdisciplinary-handbook-of-pct-learning-curves-and-psychological-change-across-populations/16230>\
**Category:** Research\
**Tags:** psychotherapy\
**Created:** [May 29, 2026, 8:42am UTC](http://discourse.iapct.org/t/r-code-for-chapter-6-of-interdisciplinary-handbook-of-pct-learning-curves-and-psychological-change-across-populations/16230 "2026-05-29T08:42:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VyvHuddy](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@VyvHuddy](http://discourse.iapct.org/u/VyvHuddy)\
**Post date:** [May 29, 2026, 8:42am UTC](http://discourse.iapct.org/t/r-code-for-chapter-6-of-interdisciplinary-handbook-of-pct-learning-curves-and-psychological-change-across-populations/16230/1 "2026-05-29T08:42:49Z")

</div>

For anyone interested, I’ve uploaded the R code used for the simulations reported in Chapter 6, _Learning Curves and Psychological Change Across Populations: The Implications of Reorganization_, in **[Interdisciplinary Handbook of Perceptual Control Theory, Volume II: Living in the Loop](https://www.iapct.org/publications/books/living_in_the_loop/)** to OSF.

The repository contains scripts for:

- E. coli random-walk simulations based on the Marken & Powers model

- A psychotherapy change simulation based on stochastic reorganisation

- Recovery, sudden gain, attendance, and relapse analyses reported in the chapter

The code has been reconstructed from archived materials and updated for reproducibility. The archived version reproduces the principal results reported in the chapter.

OSF: [https://osf.io/nheqv/overview?view\_only=2a9836e528ae435084548db118f76273](https://osf.io/nheqv/overview?view_only=2a9836e528ae435084548db118f76273)
