# Miscommunicating-Preferences oTree implementation of a behavioral experiment on strategic expression, social punishment, and belief formation under different room compositions. ## Overview This project studies when participants choose to express their true private opinion versus a socially safer opinion. The core treatment variation is the social environment: - majority size (`6A` vs `7A`) - punishment cost if targeted (`H` vs `L`) The implementation is single-player in real time: participants do not wait for or interact with live peers during the session. Group interactions are conceptually represented and can be matched ex-post from stored responses. ## Experimental Structure Session app sequence (from `settings.py`): 1. `consent` 2. `practice_round` 3. `topic_elicitation` 4. `room_composition` **Languages:** Create a session using **Baseline Experiment (English)** (`baseline_experiment_en`) or **Baseline Experiment (EspaƱol)** (`baseline_experiment_es`). The legacy name `baseline_experiment` is an alias for English. See [DATA_DICTIONARY.md](DATA_DICTIONARY.md) for how language and opinion codes are stored. ```mermaid flowchart TD consentApp[consent] --> practiceApp[practice_round] practiceApp --> topicApp[topic_elicitation] topicApp --> roomApp[room_composition] roomApp --> decisionPage[DecisionPage] decisionPage --> beliefsPage[BeliefsPage] ``` ### App-level flow - `consent`: consent confirmation + general instructions. - `practice_round`: full guided practice of the task flow, followed by a comprehension check. - `topic_elicitation` (5 rounds): elicits private opinion and willingness to pay punishment fee `c` for each topic. - `room_composition` (4 rounds): presents hypothetical room condition, collects expression choice (truth vs lie), then belief about how many others lied in that room. ## Key Notation and Conditions - `c`: cost paid by a participant to activate punishment. - `C`: cost suffered when punished (`H` high, `L` low). - `A`: majority opinion in a room. - `B`: minority opinion in a room (the participant is framed as minority relative to room composition). - `tau`: topic index/label. Room conditions: - `6A-H`: majority 6, minority 4, high punishment cost (`C = 20` points). - `6A-L`: majority 6, minority 4, low punishment cost (`C = 5` points). - `7A-H`: majority 7, minority 3, high punishment cost (`C = 20` points). - `7A-L`: majority 7, minority 3, low punishment cost (`C = 5` points). ## Repository Layout - `settings.py`: oTree session configuration and app sequence. - `shared_constants.py`: global topics, punishment fee, and room type definitions. - `consent/`: consent and instruction pages. - `practice_round/`: training flow, payoff illustration, comprehension check. - `topic_elicitation/`: repeated elicitation of private opinion and punishment willingness. - `room_composition/`: decision and belief elicitation under randomized room schedules. - `_static/room_composition/`: visual room composition assets. ## Data Collected (Conceptual) - Topic-level private opinion (`Option A`/`Option B`) and punishment willingness (`punish`) in `topic_elicitation`. - Round-level room context (`room_label`, majority size, cost condition, topic). - Expression choice in each room (`true` vs `lie`). - Belief report (`0-10`) about how many in-room participants misrepresented their private opinion. Most cross-app linkage is stored in `participant.vars` (e.g., `topic_order`, `topic_data`, `room_schedule`), then copied into model fields where needed. ## Setup and Run ### Requirements - Python 3.10+ recommended - `pip` - `otree` (6+) ### Install ```bash python -m venv .venv .venv\Scripts\activate pip install otree ``` ### Run locally ```bash otree devserver ``` Then open the local oTree URL shown in terminal. Default admin credentials in `settings.py` are currently: - username: `admin` - password: `admin` For production or shared environments, move credentials/secrets to environment variables. ## Notes and Current Limitations - Matching and social interaction are modeled ex-post; no real-time wait pages/group synchronization are used. - Topic text and option labels are currently placeholders (`topic A-E`, `Option A/B`); update these before deployment. - A `guessing_game` is not a separate app in the current implementation; beliefs are collected inside `room_composition`. ## Suggested Next Documentation Additions - Add a reproducible data dictionary mapping each exported column to app/page/round. - Document payoff computation rules for both practice and real rounds. - Add a short deployment section (Heroku/server process, environment variables, admin hardening).