Study

255 students · 6 survey waves · 87% retention · Sep 2022 – Oct 2023
Social networks, alcohol use, and norm perceptions in a UK residence hall.
A narrative study book is available at shangshanggu.com/sand. This tab provides the compact technical reference.

My Contribution

SAND is the product of my PhD research at the University of Sheffield (2021–2025). I designed the study, built the data-collection infrastructure from bare university VMs, recruited and retained 255 participants across six longitudinal waves, conducted all analysis, and wrote the thesis. Every component documented here—the REDCap architecture, the identity-separation protocol, the recruitment operations, the reproducible analysis pipeline, and this open-science release—is my own work as a sole researcher, supervised but not co-developed.


1. Overview

SAND followed 255 first-year students (from 375 invited) in one UK residence hall across six survey waves. Repeated alcohol-use measures and sociocentric important-peer nominations answered three questions:

  1. How does drinking change after students move into halls?
  2. How do perceived norms (what students think peers drink and approve of) relate to personal consumption?
  3. Do students befriend similar drinkers (social selection), or do friends' drinking habits converge over time (social influence)?

Chapter 4 prepares the data. Chapters 5–6 use network autocorrelation models for norm misperception. Chapter 7 uses a stochastic actor-oriented model to separate selection from influence.


2. Study Design

FeatureSAND
SettingOne university-managed residence hall in a UK city
Invited population375 first-year residents
Enrolled sample255 students
Survey waves6 waves, September 2022 – October 2023
Network nominationsUp to 10 important-peer nominations per participant from Wave 2
Behaviour outcomeAUDIT-C score (range 0–12)
Consequence measuresBYAACQ alcohol-consequence items
Norm constructsDescriptive and injunctive norm perceptions at global and peer levels
Main modelsNetwork Autocorrelation Models (NAM) and Stochastic Actor-Oriented Models (SAOM)
SAOM wavesWaves 2, 4, 5, 6 with baseline covariates from Wave 1
Data collectionREDCap on a university-hosted Linux/Apache/MySQL stack
Identity separationBaseline and follow-up REDCap projects with role-based access separation

2.1 Wave Map

WaveTimingDownstream use
Wave 1Sep 2022 (baseline)Baseline covariates, pre-university alcohol measures, Chapter 4
Wave 2Oct 2022First network measurement; Ch 5/6 Time 1; Ch 7 SAOM start
Wave 3Nov 2022Longitudinal preparation and QA
Wave 4Dec 2022Ch 7 SAOM
Wave 5Mar 2023Ch 5/6 Time 2; Ch 7 SAOM
Wave 6Oct 2023Ch 5/6 Time 3; Ch 7 SAOM end

Chapters 5 and 6 use three analysis timepoints (Time 1/2/3 = Waves 2/5/6). Chapter 7 uses four network observations (Waves 2/4/5/6) with Wave 1 baseline covariates.

2.2 Network Boundary

The network boundary is the residence hall cohort. Each participant could nominate up to 10 people who had been important to them in the past month, regardless of liking. Nominations are directed: A nominating B does not imply reciprocity. Legacy code sometimes uses “friend” as shorthand for nominated important peers.

Network measurement began at Wave 2, one month after arrival. The first weeks of tie formation are unobserved.

2.3 Timeline

Study Timeline 375 targeted · 255 enrolled (68%) · 87% retention · Single residence hall, a UK university town Year 1 Year 2 W1 Baseline Sep 2022 N=255 W2 NAM T1 Oct 2022 W3 Nov 2022 W4 Dec 2022 W5 NAM T2 Mar 2023 W6 NAM T3 Oct 2023 Freshers’ spike (4.9 → 7.4) SAOM (Ch. 7) — Waves 2, 4, 5, 6 NAM (Ch. 5–6) — Times 1, 2, 3 Baseline covariates from W1 · AUDIT-C 0–12 · Max 10 nominations/wave · RSiena n3 = 10,000

2.4 Participant Flow

WaveTimingNAM NJaccardMean AUDIT-CSD
W1 (baseline)Sep 20222554.92.8
W2Oct 20222187.43.0
W3Nov 20226.73.0
W4Dec 20220.676.53.1
W5Mar 20232130.816.43.1
W6Oct 20232150.666.72.9

NAM N is the analysis sample after listwise deletion for the descriptive norm models (Chapter 5). Jaccard indices measure wave-to-wave network stability; all exceed RSiena’s 0.30 threshold. Overall retention across the study was 87%.

2.5 Data Collection Infrastructure

Data were collected via REDCap hosted on a university-managed Linux/Apache/MySQL/SSL stack. Two linked REDCap projects separated contact data from survey responses. The identity manager resolved names to pseudonymous IDs; the researcher exported only coded, de-identified data. The staged export (list_by_wave.RData) is the single input to the analysis pipeline.

See the Infra tab for the full server stack, two-project model, identity separation workflow, recruitment operations, incentive automation, and REDCap API export configuration.


3. Key Findings

In this sample, mean AUDIT-C rose from 4.9 (pre-university baseline) to 7.4 one month after arrival. At the October peak, 80% reported monthly binge drinking and 60% weekly. Scores declined over the academic year but did not return to baseline.

3.2 Descriptive Norm Misperception (Chapter 5)

In all waves, participants overestimated typical-resident drinking by 1.5–1.7 AUDIT-C points. NAM estimates showed a shift in which referent predicted personal consumption:

Time PeriodGlobal Misperception βPeer Misperception βInterpretation
Time 1 (Oct)0.541 (p<0.001)0.045 (n.s.)Community norms dominate
Time 2 (Mar)0.547 (p<0.001)0.124 (p<0.05)Peer influence emerges
Time 3 (Oct)0.246 (p<0.01)0.192 (p<0.01)Both matter; peer gaining

At Time 1, global misperception was the stronger predictor. By Time 3, peer-level misperception reached comparable magnitude, consistent with a referent shift as friendship clusters stabilised.

3.3 Injunctive Norms (Chapter 6)

Participants overestimated peer approval of risky drinking across all three scenarios. However, neither global nor peer injunctive misperception predicted consumption in any of the nine NAM models (3 scenarios × 3 time periods).

ScenarioTimeGlobal Misp. βPeer Misp. βStatus
Not drinkingT1−0.001 (n.s.)0.005 (n.s.)Neither significant
T2−0.015 (n.s.)0.004 (n.s.)Neither significant
T30.006 (n.s.)−0.020 (n.s.)Neither significant
Binge drinkingT1−0.004 (n.s.)−0.019 (n.s.)Neither significant
T2−0.012 (n.s.)0.006 (n.s.)Neither significant
T3−0.005 (n.s.)0.007 (n.s.)Neither significant
Passing outT10.003 (n.s.)0.013 (n.s.)Neither significant
T20.025 (n.s.)−0.005 (n.s.)Neither significant
T3−0.020 (n.s.)−0.003 (n.s.)Neither significant

All 63 coefficient checks (7 terms × 3 scenarios × 3 time periods) reproduce thesis values to 3 decimal places. Previous drinking (AUDIT-C at t−1) and ethnicity consistently predict consumption; injunctive misperception does not.

3.4 Social Selection & Influence (Chapter 7)

The SAOM models network tie change and behaviour change jointly, separating two processes:

Social selection (similar drinkers become friends?): AUDIT-C similarity (β=−0.08, p=0.88), ego (β=−0.04, p=0.18), and alter (β=0.03, p=0.35) were all non-significant. The model found no evidence that drinking similarity predicted tie formation.

Social influence (friends become similar drinkers?): The average similarity effect was significant (β=1.88, p<0.01), yielding an odds ratio of 1.17 (95% CI: 1.05–1.31). Under the model, students were 17% more likely to shift their drinking one unit toward their friends’ average than to hold steady.

EffectβSEpInterpretation
Average similarity (influence)1.880.68<0.01Drinking convergence among friends
AUDIT-C similarity (selection)−0.080.530.88n.s.; no selection on drinking
Reciprocity2.700.31<0.001Mutual ties favoured
Transitive triplets0.780.12<0.001Triadic closure
Flatmate proximity0.760.23<0.001Flat co-residence predicts ties
Blockmate proximity0.800.22<0.001Block co-residence predicts ties
Density−2.910.52<0.001Sparse network

On thesis data: convergence max ratio ≤ 0.10; Jaccard indices 0.67, 0.81, 0.66. Proxy-data convergence is not yet verified.


4. Data Dictionary

Collapsed. Repeated friend-slot variables (slots 1–10) shown as patterns. make DATA_MODE=proxy portfolio generates the expanded version.

4.1 Identifiers

VariableTypeDescriptionWaves
redcap_survey_identifierintegerPseudonymous participant key for within-study linkage1–6
redcap_event_namecharacterREDCap event label (wave1_arm_1 to wave6_arm_1)1–6

4.2 Demographics & Residence

VariableTypeEncodingDescriptionWaves
agenumericYearsParticipant age at survey1–6
sexinteger0/1Sex covariate (0=female, 1=male)1–6
ethnicityintegerCollapsed categoricalEthnicity category1–6
majority_statusinteger0/1Composite majority-status covariate for Ch 71–6
residence_clusterintegerProxy residence grouping; real data uses block/flat fields1–6

4.3 Alcohol Use & Consequences

VariableTypeRangeDescriptionWaves
q1numeric0–4AUDIT-C item 1: drinking frequency1–6
q2numeric0–4AUDIT-C item 2: typical drinks per occasion1–6
q3numeric0–4AUDIT-C item 3: heavy episodic drinking frequency1–6
audit_scorenumeric0–12AUDIT-C composite: q1 + q2 + q31–6
byaacq_6numeric0–6BYAACQ-derived passing-out field for Ch 6 blackout outcome1–6

4.4 Important-Peer Nominations

VariableTypeDescriptionWaves
friend_numbernumericNumber of important-peer nominations made (0–10)2–6
which_friendidintegerNomination slot index (1–10)2–6
nominationintegerPseudonymous ID of nominated peer2–6

4.5 Norm Perceptions

PatternTypeDescriptionWaves
inno[1-3]_selfnumericOwn approval of: (1) not drinking, (2) binge, (3) passing out1–6
deno[1,3,4]_friend_0integerPerceived drinking behaviour of a typical resident2–6
inno[1-3]_friend_0integerPerceived approval by a typical resident2–6
deno[1,3,4]_friend_[1-10]integerPerceived drinking behaviour of nominated peer (slots 1–10)2–6
inno[1-3]_friend_[1-10]integerPerceived approval by nominated peer (slots 1–10)2–6

4.6 Derived Measures

FamilyFormula
actual_*_peerMean of the corresponding measure across nominated important peers
deno*_peerAggregated perceived important-peer descriptive norm
inno*_peerAggregated perceived important-peer injunctive norm
misperception_*_peerPerceived peer value minus actual peer mean
audit_scoreq1 + q2 + q3

5. Known Limitations

LimitationImpact
Behaviour GoF is poor (p<0.001)Bimodal AUDIT-C distribution violates SAOM’s continuous-behaviour assumption
Missing first-week dataNetwork measurement began one month after arrival; early formation period is unobserved
Single-hall designOne residence hall in a UK university town; UK binge rates (80%) far exceed US cohorts (~28%)
68% response rateMissing network data could bias tie-formation estimates
Self-reported alcohol dataSocial desirability and recall error
No study preregistrationRetrospective reproducibility release, not a preregistration

6. Acknowledgements & Contact

This research was funded by a Wellcome Trust Research and Training Support Grant (224 850/Z/21/Z) through the PHEDS Doctoral Training Centre at the University of Sheffield. The funder had no role in study design, data collection, analysis, or the decision to publish.

Supervisors:

Contact
Shangshang Gu
shangshanggu@gmail.com

Infrastructure

REDCap · MySQL · Apache/SSL · Postfix · cron · API export
The data-collection stack behind the six-wave longitudinal study.

1. Server Stack

The lead researcher built the stack from bare university VMs. The university had no centrally managed REDCap instance. Two dedicated VMs formed a split web/database architecture on the university network:

Participants (HTTPS :443) Web Server 2 vCPU · 4 GB Apache 2 + mod_ssl PHP 7.4 → 8.1 REDCap v12–v13 Postfix (smarthost) cron (every min) TLS 1.3 + OCSP HttpOnly + Secure cookies · GEANT OV RSA CA 4 Database Server 2 vCPU · 4 GB MySQL 8.0 on Ubuntu Dedicated study database · scoped user 220 tables · 538 FKs · 623 indexes Port 3306 open only from web server · bind-address scoped :3306 University Network Boundary Web server: HTTPS only · admin access from university network Database server: no public ports · accepts connections from web server only
LayerComponentDetail
Web server VMUbuntu / Apache 2 / PHP (7.4–8.1) / SSL2 vCPUs, 4 GB RAM, 32 GB SSD. Port 443 open to participants. SSL certificates issued by IT Security with auto-renewal.
Database server VMUbuntu / MySQL 8.0Same spec. Port 3306 open only from the web server. Dedicated redcap MySQL user with scoped privileges on the study database.
ApplicationREDCap v12.5.5 → v13.10.0Installed from the REDCap Community distribution. Six versions deployed across the study period (v12.5.5, v12.5.8, v12.5.9, v13.5.1, v13.9.3, v13.10.0).
Mail relayPostfix (internet with smarthost)Delivers scheduled survey invitations, reminders, and incentive codes.
SchedulerREDCap cron jobSends reminders on schedule, triggers survey invitations, expires inactive links.
AuthenticationTable-based, 30-min auto-logoutAutocomplete disabled on login. Clickjacking prevention enabled. User-created projects disabled for non-admin accounts.

Setup tasks. MySQL installation and secure configuration (mysql_secure_installation, dedicated user, remote bind, privilege scoping), Apache virtual-host and SSL certificate installation, PHP module setup (php-mysql, php-curl, php-gd, php-zip, php-mbstring, php-xml), REDCap database table creation via SQL, Postfix email relay, cron job, and a custom email-validation rule restricting registration to the university domain.

Security configuration. REDCap Control Centre: Send-It disabled, draft-mode auto-approval set to Never, non-admin users cannot create projects or modify events, survey response editing disabled, repeatable instruments locked.

Retained evidence. A complete database backup and server configuration archive were preserved at the end of the study. Python scripts parse the backup offline, enabling reproducible evidence extraction without a running database instance.

SSL and transport security

TLS 1.3 only (all older protocols disabled). OCSP stapling enabled. HttpOnly and Secure flags enforced on all cookies. Directory indexing disabled. Certificates issued by university IT Security with auto-renewal.

Scheduled tasks

A minute-frequency cron job drives REDCap’s automated survey invitations, reminders, and link expiry.

Database isolation

Separate web and database VMs connected over the university internal network. The application used a dedicated, scoped MySQL user with minimum-privilege access to a single study database. A de-identification salt was configured for REDCap’s internal hashing.

Network isolation

The database VM had no public-facing ports. MySQL accepted connections only from the web server, enforced by both bind-address configuration and host-level firewall rules. The application database user held minimum-privilege access (no schema modification, no administrative rights). SSH access was restricted to the university network. HTTP traffic was forced to HTTPS via redirect.

REDCap Control Centre hardening

Key security settings: non-admin users cannot create projects, draft-mode changes require admin approval, file-sharing (Send-It) disabled, API enabled for controlled data export, survey links shortened via REDCap’s built-in shortener.


2. Two-Project Model

The study used two linked REDCap projects with role-based access separation:

PIS Portal Production · 1 form · 17 fields Participant Information Sheet Consent gateway Email domain validation 13 surveys configured 1,509 data rows Baseline 28 instruments · 231 fields Consent form (41 fields) Alcohol use / AUDIT-C (38 fields) ID key + email validation RAF referral ×4 groups Amazon eGift automation 30 surveys · 400-row randomisation 56 branching rules · 19 PHI fields 21,647 data rows Follow-up 8 instruments · 239 fields · 5 waves Alcohol use / AUDIT-C (45 fields) Friend nomination (64 fields, 21 calc) Friend1 perceptions (96 fields) Friend0 (typical peer, 11 fields) Amazon eGift + prize draw 34 surveys · 151 branching rules 123 required fields · 62 validated 101,017 data rows Identity Separation Boundary Identity Manager design + key access Project Manager operations only Amazon Code Manager codes only Data Flow Consent + names @HIDDEN-SURVEY → coded IDs De-identified export list_by_wave.RData → Pipeline tab No team member simultaneously held export access and the identity key
ComponentPurposeAccess
Baseline projectConsent, demographics, pre-university alcohol measures, contact details, email validationIdentity manager + researcher
Follow-up projectsWaves 2–6 surveys: AUDIT-C, peer nominations (coded by ID), descriptive and injunctive norm perceptions, alcohol consequencesResearcher (export only, de-identified)
Identity manager keyMaps record IDs, pseudonymous six-digit codes, email addresses, and nomination roster positionsIdentity manager only

After baseline collection, the researcher exported all responses and erased the baseline project data from REDCap. The follow-up project was rebuilt from exported instrument ZIP files, preserving survey design without carrying forward participant records.

The PIS portal served as the consent gateway (1 form, 17 fields). The baseline project collected data across 28 instruments covering consent, alcohol measures, email validation, incentive distribution, referral management, and identification-key operations. The follow-up project collected five waves of data (waves 2–6) across 8 instruments including friend-nomination forms with 10 per-friend survey pages.


3. Identity Separation

The core design problem: participants must see names to nominate peers, but the analyst must not access those names.

The identity manager generated six-digit random identifiers in Excel (RANDBETWEEN) and loaded the resulting roster into the follow-up project, linking names to pseudonymous IDs.

When participants nominated up to 10 important peers by name (via dropdown), REDCap’s @HIDDEN-SURVEY and @HIDDEN-FORM action tags separated what participants saw from what the system recorded:

Action tagEffect
@HIDDEN-FORMName-selection fields visible to participants during the survey, hidden from the researcher in data views and reports
@HIDDEN-SURVEYCalculated ID fields hidden from participants, recorded in the database for export

A calculated field converted each name selection to its coded ID. The researcher could export de-identified data only: no free text, no dates, no identifier fields, no access to reports or the design interface after initial setup.

No team member simultaneously held export access and the identity key.

Identity-key fields (suffixed _ik) are systematically hidden from the survey view and marked read-only, confirming the separation is enforced at the field level, not merely by convention.

Calculated fields for pseudonymised linkage

The follow-up project contains 21 calculated fields in the friend_nomination instrument. Ten fields convert name-dropdown selections to numeric IDs. A further 10 detect duplicate nominations using conditional logic, with an aggregating error-check flag. A friend_number field counts valid nominations per respondent.


4. Recruitment Operations

Baseline Classic Sep–Oct 2022 255 enrolled Wave 2 Longitudinal Oct 2022 Wave 3 Nov 2022 Wave 4 Dec 2022 Wave 5 Mar 2023 Wave 6 Oct 2023 Overall retention: 87% · 101,017 follow-up data rows Unique survey links · Up to 3 reminders per wave · £10 eGift per completion

Recruitment ran in two phases with daily response tracking.

PhasePeriodMethodOutcome
A: Public invitation20 Sep – 7 Oct 2022Three Residence Life emails to 375 residents. 400 A5 + 100 A4 posters. One in-person session. Public REDCap link with university email domain validation.~160 completed records by the initial deadline.
B: Refer-a-friend8–14 Oct 2022Respondent-driven sampling. Each existing participant received a unique referral code. Referrers earned £10 per new participant; referred participants received an extra £5 bonus.Additional enrolments bringing the total to 255.

Follow-up waves (2–6) used unique non-forwardable survey links emailed via REDCap’s participant list. Up to three reminder emails per wave.

An anonymous enquiry portal stayed open throughout data collection. Participants could raise concerns without identifying themselves.

The follow-up project contains five longitudinal events (one per wave), each linking the same core instruments: alcohol use, friend nomination, per-friend perception pages, and incentive delivery. Combined with the baseline project (single event), the study covers six longitudinal time-points.


5. Incentive Automation

£10 Amazon eGift Card per completed survey. From Wave 2 onward, codes were delivered automatically at survey completion via the REDCap randomisation module:

Additional incentives: £10 bonus for completing all six waves, £500 prize draw at study end, £10 per successful referral for the referrer, £5 bonus for each referred participant.


6. Database Schema

The archived REDCap database preserves the full relational schema:

MetricCount
Tables220
Foreign-key constraints538
Non-unique indexes519
Unique indexes104
Configuration entries342

External modules installed

ModuleVersionPurpose
giftcard_rewardv2.0.1Automated Amazon eGift Card distribution at survey completion
auto_populate_fieldsv2.6.0Pre-fill fields from prior events or calculated sources
record_autonumberv1.0.5Sequential record numbering for enrolment tracking
unique_actiontagv2.0.2Enforce uniqueness constraints on field values (e.g., email addresses)
shazamv1.3.10Custom HTML/CSS/JS injection for instrument display

7. Field-Level Engineering

The follow-up project demonstrates the complexity of sociometric data collection at the field level:

MetricBaselineFollow-up
Total fields231239
Branching-logic rules56151
Required fields61123
Fields with validation562
PHI-marked fields1912
Calculated fields424

Validation types (follow-up project)

TypeCountUse
number36Numeric range enforcement on scale items
int15Integer-only fields (counts, IDs)
autocomplete10Peer-nomination dropdown search
float1Decimal values

The baseline project adds 5 validated fields: 2 alpha_only (name fields), 1 email, 1 float, 1 int.

Branching logic: sociometric nomination cascade

The follow-up project’s 151 branching rules implement a cascading survey design where each nominated friend generates a personalised block of perception questions:

Friend Nomination Cascade (follow-up project, per wave) friend_nomination 64 fields · 21 calc · 11 dropdowns Select up to 10 friends by name Duplicate detection error2–error10 (calc) error_check = Σ(errorN) Name → Code friendid1–friendid10 = sum([friendN]) @HIDDEN-SURVEY on coded fields For each valid friend (error=0): Layer 1: Gate question deno1_friend_N: [friendN]<>"" and [errorN]=0 Layer 2: Follow-up deno2_friend_N: ... and [deno1]>1 Layer 3: Cross-wave friend_confirm: [prev-event][friendN]>1 ×10 friends × 4 norm dimensions = 151 branching rules Four norm perception dimensions per friend: deno (desc. frequency) deno (desc. quantity) inno (inj. approval) inno (inj. quantity) Participant journey per wave: AUDIT-C Nominate friends Rate friend 0 (typical) Rate friends 1–10 eGift Card code

The logic follows a three-layer pattern:

# Layer 1: Show descriptive-norm question only if friend N was nominated
# and is not a duplicate (error check passed)
deno1_friend_3: [friend3]<>"" and [error3]=0

# Layer 2: Show frequency question only if friend was nominated
# AND respondent rated them as drinking "sometimes" or more
deno2_friend_3: [friend3]<>"" and [error3]=0 and [deno1_friend_3]>1

# Layer 3: Cross-wave confirmation — show friend only if they
# appeared in the previous wave's nomination list
friend3_confirm: [previous-event-name][friend3:value]>1

This pattern repeats for friends 1–10 across four norm dimensions (descriptive frequency, descriptive quantity, injunctive approval, injunctive quantity), yielding the 151 branching rules. Fields with [previous-event-name] references demonstrate REDCap’s longitudinal piping: values carry forward from wave to wave without re-entry.

Duplicate-nomination detection

# Calculated field: flag if friend5 duplicates any earlier nomination
error5 = if(([friend5]<>"" and ([friend5]=[friend4] or
  [friend5]=[friend3] or [friend5]=[friend2] or [friend5]=[friend1])),1,0)

# Aggregate: total number of flagged duplicates
error_check = [error2]+[error3]+[error4]+[error5]+[error6]+
  [error7]+[error8]+[error9]+[error10]

If error_check > 0, the respondent is prompted to correct their nomination. This is automated data-quality enforcement at the instrument level.


8. Export Boundary

The researcher exported follow-up data via REDCap’s API. De-identification settings stripped free-text fields, date/time fields, and identifier fields before delivery.

The staged export (list_by_wave.RData) is the single input to the reproduction pipeline. Everything upstream belongs to the data-collection infrastructure; everything downstream belongs to the analysis pipeline documented in the Pipeline tab.


9. Design Decisions

Each choice below resolves a tension specific to sociometric data collection.

DecisionRationaleImplementation
Separate identifiers from responsesParticipants must see names to nominate; analyst must not access names.@HIDDEN-SURVEY / @HIDDEN-FORM action tags + calculated fields. Export set to de-identified only.
Unique non-forwardable linksPublic links would allow duplicate or non-resident submissions.REDCap participant list with individual survey links tied to validated email addresses.
Identity manager roleSomeone must verify residence and assign IDs but must not see responses.Identity manager: design access + identity key. Researcher: export-only, de-identified. No overlap.
Erase baseline data after exportMinimise window where names and responses coexist on the server.Export to encrypted local file, delete from REDCap. Follow-up built from instrument ZIPs.
Automated incentive distributionManual voucher assignment is slow and creates a privacy risk.REDCap randomisation module with a 400-row allocation table per project. No manual step.
Staged export boundaryAnalysis pipeline must not depend on live REDCap access or raw contact data.list_by_wave.RData is the single handoff file.

10. Role-Based Access Control

User rights were configured so that no team member simultaneously held export access and identity-key access. Named roles enforced the separation:

ProjectRoleCapability
BaselineAdminDesign + rights management
Project ManagerOperational management, no design access
Validation OfficerData validation only
Identification Code ManagerIdentity-key operations only
Follow-upAdminDesign + rights management
Project ManagerOperational management, no design access
Identification Code ManagerIdentity-key operations only
Amazon Code ManagerGift-card code distribution only

Five distinct role definitions were created across the two projects: Project Manager, Validation Officer, Super User, Identification Code Manager, and Amazon Code Manager. The identity manager had no export access; the researcher had no access to the identity-key instruments.


11. Audit Trail

REDCap logs every action to numbered redcap_log_event tables. The study’s audit trail covers survey submissions, record operations, user logins, role changes, and configuration updates across the full data-collection period (August 2022–September 2024). This trail is preserved in the archived backup and is available for institutional review.


12. Backup & Evidence Verification

A complete database backup and application archive were extracted from the production servers at the end of the study. The backup preserves the relational schema, project metadata, instrument definitions, and operational configuration needed to verify claims made in this documentation.

Automated evidence extraction

Python scripts parse the database backup offline as a text stream, extracting project structure, instrument definitions, action-tag usage, calculated fields, role definitions, event configuration, and survey settings. No running database instance is required. A single pass completes in under 2 seconds. Numeric claims in this tab were verified against these scripts.

python3 extract_projects.py          # project inventory
python3 extract_evidence.py           # instrument and role extraction
python3 generate_data_dictionaries.py # portable data dictionaries

13. Reproduction Guide

A researcher with no prior REDCap experience can recreate the study infrastructure from the portable files in presentation/portable/. These files contain only project structure (instruments, fields, logic, action tags) and zero participant data.

Portable artefacts

FileSizeContents
pis_portal_data_dictionary.csv21 KB17 fields, 1 instrument (PIS + consent)
baseline_data_dictionary.csv90 KB231 fields, 28 instruments
followup_data_dictionary.csv218 KB239 fields, 8 instruments, 151 branching rules, 24 calculated fields
followup_events.csv1 KB5 longitudinal events (wave2–wave6) with form assignments

Generated by python3 presentation/generate_data_dictionaries.py, which parses the database backup without requiring MySQL.

Prerequisites

Step 1: Start a local REDCap instance

A Docker Compose config is provided in presentation/redcap-docker/:

cd presentation/redcap-docker/redcap-docker/

# Place REDCap source so that data/redcap/index.php exists
cp -r /path/to/redcap-source/* data/redcap/

docker compose up -d
# Wait ~30s for MySQL, then open http://localhost:8080

The container runs Apache + PHP + MySQL in an isolated network. No data leaves the machine. No email is sent.

Step 2: Create the baseline project

  1. Log in (the DZD container creates a site_admin on first boot)
  2. New Project → name it “TFS Baseline” → Classic project
  3. Project Setup → Data Dictionary → Upload baseline_data_dictionary.csv
  4. REDCap recreates all 28 instruments, 231 fields, 56 branching rules, 61 required-field constraints, 34 @DEFAULT tags, 14 @HIDDEN-SURVEY tags, and 37 @READONLY tags from the CSV alone

Step 3: Create the follow-up project

  1. New Project → name it “TFS Follow-up” → Longitudinal project
  2. Project Setup → Define My Events → create five events matching followup_events.csv:
    wave2  day_offset=1
    wave3  day_offset=2
    wave4  day_offset=3
    wave5  day_offset=4
    wave6  day_offset=5
  3. Data Dictionary → Upload followup_data_dictionary.csv
  4. Designate Instruments for My Events → assign forms per the forms column in followup_events.csv

This recreates the full sociometric instrument with 239 fields, 151 branching rules, cascading friend-nomination logic, duplicate-detection calculated fields, and all action tags.

Step 4: Verify

CheckExpectedHow to verify
Baseline instrument count28Online Designer → count instruments listed
Baseline field count231Data Dictionary → row count
@HIDDEN-SURVEY in baseline14 fieldsData Dictionary → filter Field Annotation column
Follow-up instrument count8Online Designer
Follow-up field count239Data Dictionary → row count
Longitudinal events5 (wave2–wave6)Define My Events page
Branching rules151Data Dictionary → count non-empty Branching Logic cells
Calculated fields24Data Dictionary → filter Field Type = “calc”

Step 5: Explore the survey design

Navigate the Online Designer to see the instruments as they appeared to participants and researchers:

What the portable files do not contain

These limitations are deliberate: participant data is confidential, and operational settings depend on the deployment context.


14. Infrastructure Limitations

LimitationImpact
Roster-based nominationParticipants nominated from a searchable dropdown (REDCap autocomplete). Suitable at this cohort size; larger populations might benefit from additional search or filtering to manage the roster.
Excel-based identity-key generationIdentity manager generated six-digit codes in Excel (RANDBETWEEN) and loaded the roster into REDCap. This was accessible for non-technical identity managers. API-based linkage would reduce manual steps at larger scale.
No automated failoverStandard university VM snapshots only. Not required for this single-cohort study and would have been solvable within the architecture if needed.
REDCap version migrationUpgrades (12.5.5 → 13.5.1 → 13.9.3) required manual testing. No automated regression suite for survey behaviour.

Pipeline

Chapters 4–7. Make-orchestrated, config-driven.
Paths, toggles, and seeds live in reproduced/config/thesis.yml.

1. Architecture

list_by_wave.RData Raw REDCap export · 6 waves · 255 students Chapter 4: Data Preparation QA checks → LOCF imputation → Network arrays + Norm variables network_arrays.rds norms_longitudinal.rds Chapter 7: SAOM RSiena · Selection vs Influence Chapter 5: Descriptive NAM Network autocorrelation × 3 Chapter 6: Injunctive NAM Network autocorrelation × 3 Validation · Reproducibility Manifests · SHA-256 Checksums · Portfolio R 4.3.2 + Python 3.11 · GNU Make · Conda + renv · RSiena 1.4.7 · testthat + pytest Config: reproduced/config/thesis.yml · Proxy or real data modes
LayerTechnology
LanguageR 4.3.2 (analysis), Python 3.11 (tooling, verification)
OrchestrationGNU Make with config-driven targets
ConfigurationSingle YAML file: reproduced/config/thesis.yml
EnvironmentConda (system packages) + renv (R library lock)
R dependency lockrenv.lock with 90 packages including RSiena 1.4.7
SAOM estimationRSiena 1.4.7 (exact pinned from CRAN Archive)
ContainerDockerfile (optional, for CI and clean-room runs)
Privacy scanningR-based portfolio privacy guard + Python release-builder secret scanner
Testingtestthat (R), pytest (Python)

2. Directory Structure

SAND/
├── Makefile                         Top-level proxy to reproduced/Makefile
├── Dockerfile                       Optional container build
├── LICENSE                          MIT (code) + CC BY 4.0 (docs)
├── CITATION.cff                     Citation metadata
├── README.md                        Entry point with findings and quick start
├── DATA_AVAILABILITY.md             What is public, protected, and synthetic
├── SECURITY.md                      Credential and vulnerability reporting
├── CONTRIBUTING.md                  Contribution workflow
├── CHANGELOG.md                     Release history
│
├── docs/
│   ├── reference.html               This file
│   └── readme-assets/               SVG figures for README
│
└── reproduced/                      The reproduction workspace
    ├── Makefile                      Build contract (all targets)
    ├── .Rprofile                     renv activation and library precedence
    ├── renv.lock                     90-package R dependency lock
    ├── environment.yml               Conda environment specification
    ├── REPRODUCIBLE_PIPELINE.md      Canonical build contract
    ├── README.md                     Pipeline entry point
    │
    ├── config/
    │   ├── thesis.yml                Single source of truth
    │   └── scenarios/
    │       └── saom_models.yml       SAOM model specifications
    │
    ├── data/
    │   ├── raw/                      Protected real data (staged locally, never committed)
    │   │   └── README.md
    │   ├── proxy/                    Synthetic structure-compatible data
    │   │   └── list_by_wave_schema.csv
    │   └── vendor/
    │       └── rsiena/               Pinned RSiena 1.4.7 source tarball
    │
    ├── analyses/
    │   ├── chapter4_data_collection/scripts/
    │   ├── chapter5_descriptive_norms/scripts/
    │   ├── chapter6_injunctive_norms/scripts/
    │   ├── chapter7_saom/scripts/
    │   └── chapter8_interventions/scripts/
    │
    ├── scripts/
    │   ├── 00_setup/                 Environment, proxy generation, verification, release
    │   ├── portfolio/                Data dictionary, privacy guard, dashboard
    │   ├── visualisation/            Network explorers, microstep animation
    │   └── utils/                    YAML loader, helpers
    │
    ├── tests/
    │   ├── test_verify_outputs.py    Verifier unit tests
    │   ├── test_build_public_release.py  Release-builder tests
    │   └── portfolio/testthat/       R portfolio test suite
    │
    ├── docs/
    │   ├── README.md                 Documentation hub
    │   ├── references/               Stable background: crosswalk, config guide, etc.
    │   ├── portfolio/                Public-facing study book, case study, findings
    │   ├── roadmaps/                 Canonical execution plan
    │   ├── status/                   Release audit and verification records
    │   └── decisions/                Architectural decision records
    │
    ├── outputs/                      Generated (gitignored)
    │   ├── chapter4/ ... chapter7/
    │   └── portfolio/
    │
    └── R/                            Shared R utilities

3. Configuration

Scripts read paths and toggles from reproduced/config/thesis.yml. Hardcoded paths in analysis code are bugs.

3.1 Key Config Paths

KeyPurpose
data.modereal (default) or proxy
data.proxy_dirProxy data directory
project.paths.raw_data_dirProtected real data staging area
chapters.*.enabledPer-chapter toggle (Ch 8 is false by default)
chapters.chapter5_descriptive_norms.nam.seedNAM reproducibility seed
rsiena.package_versionPinned RSiena version (1.4.7)
rsiena.estimation.seedSAOM RNG seed (2022)
rsiena.estimation.n3Phase 3 iterations (10000)
rsiena.use_cached_resultsfalse forces re-estimation

4. Data Modes

ModeSourcePurposePublic?
Realreproduced/data/raw/Reproduce thesis analyses from protected REDCap exportsNo
Proxyreproduced/data/proxy/Exercise the pipeline with synthetic, structure-compatible dataYes

Priority: SAND_DATA_MODE env var overrides data.mode in thesis.yml.

Proxy data share the schema but contain no participant information. They are synthetic, not anonymised.

4.1 Proxy Data Generator

The script scripts/00_setup/create_realistic_proxy_data.R produces a deterministic synthetic dataset. Fixed seed: 20250921.

ParameterValue
Students255
Waves6 (matching study design)
Network densityCalibrated to observed nomination volumes
AUDIT-C distributionWave-specific means and SDs from thesis Table 4.x
Residence structure12 blocks, 72 flats, ~3.5 students per flat
Flatmate dyads666
Blockmate dyads5,166
Nomination slotsUp to 10 per participant per wave

The generator produces list_by_wave.RData, participants.csv, outcomes.csv, a schema file, and a JSON generation report. Network ties, alcohol scores, and norm perceptions follow study-level design parameters; they do not transform, perturb, or anonymise real participant data.


5. Quick Start

5.1 Proxy Mode (no real data required)

make env                 # bootstrap Conda + renv + RSiena 1.4.7
make verify-proxy-quick  # regenerate proxy data, run Chapters 4-6

# Full path including Chapter 7 (~2 hours):
make verify-proxy

5.2 Real Data Mode

make env

# Stage required files:
#   reproduced/data/raw/list_by_wave.RData  (required)
#   reproduced/data/raw/participants.csv    (optional)
#   reproduced/data/raw/outcomes.csv        (optional)

make verify-real  # Chapters 4-7 plus empirical benchmarks

6. Chapter Walkthrough

6.1 Chapter 4: Data Preparation & QA

Method: Data extraction from REDCap exports, participation coverage, quality-assurance checks, imputation, network array construction.

Scripts (executed sequentially by make chapter4)

Outputs

chapter4/data/norms_longitudinal.rdsAnalysis-ready longitudinal panel (all waves) chapter4/data/network_arrays.rdsDirected adjacency matrices aligned to SAOM waves chapter4/manifests/prepared_data_manifest.jsonInput/output hashes and run metadata chapter4/logs/run.jsonExecution log with timestamps

6.2 Chapter 5: Descriptive Norms (NAM)

Method: Network Autocorrelation Models (sna::lnam()) across 3 time periods, quantifying how global and peer-level descriptive norm misperception relates to personal consumption.

Scripts

Outputs

chapter5/tables/nam_summary.csvNAM coefficients for all 3 time periods chapter5/tables/nam_diagnostics.csvModel fit diagnostics chapter5/tables/nam_comparison.csvCurrent vs. thesis benchmark comparison chapter5/figures/nam_coefficients.pngCoefficient comparison plot chapter5/logs/nam_checksums.jsonOutput file hashes

6.3 Chapter 6: Injunctive Norms (NAM)

Method: NAM across 3 approval scenarios (abstaining, binge drinking, passing out), testing whether injunctive norm misperception predicts consumption.

Scripts

Outputs

chapter6/data/approval_longitudinal.rdsScenario-level longitudinal datasets chapter6/tables/Injunctive NAM summaries and comparisons chapter6/figures/Approval trend plots

6.4 Chapter 7: Social Selection & Influence (SAOM)

Method: Stochastic Actor-Oriented Model (RSiena 1.4.7) jointly modelling network tie change and behaviour change across Waves 2, 4, 5, 6. Separates social selection from social influence.

Scripts

Estimation parameters

ParameterValuePurpose
RNG seed2022Reproducibility across runs
Phase 3 iterations (n3)10000Convergence diagnostics precision
Subphases (nsub)4Phase 2 refinement steps
Initial gain (firstg)0.1Step size in Phase 1
Gain reduction (reduceg)0.5Step decay per subphase
Dolby correctiontrueReduces variance in Phase 3
Max iterations8Re-estimation attempts before stopping

Outputs

chapter7/cache/base_fit.RDataFitted RSiena model object chapter7/tables/Coefficient tables and diagnostics chapter7/figures/GoF and convergence plots chapter7/logs/saom_diagnostics.jsonMachine-readable convergence report saom_base.txtFull RSiena text output (at repo root)

Runtime: ~2 hours on Apple M4 (10 cores). The fast CI gate covers Chapters 4–6 only; Chapter 7 is a separate manual or scheduled job.

6.5 Chapter 8: Interventions (Experimental)

Method: Counterfactual SAOM scenario simulations. Disabled by default (chapters.chapter8_interventions.enabled: false).

Status: Scaffolding exists. Not part of the verified release. 462 scenarios × 3 chained periods.


7. Thesis-to-Code Crosswalk

Mapping from thesis chapter claims to the scripts and output files that produce them.

Thesis claim / outputScriptOutput fileValidation
Ch 4: Participation, retention, Jaccard indiceschapter4/.../02_qa_checks_norms.Rchapter4/logs/chapter4_qa_assertions.jsonQA assertions checked automatically
Ch 4: Longitudinal norms panelchapter4/.../03_export_norms_longitudinal.Rchapter4/data/norms_longitudinal.rdsManifest with SHA-256 hashes
Ch 4: Network adjacency arrayschapter4/.../04_export_chapter5_bridge.Rchapter4/data/network_arrays.rdsManifest hash; consumed by Ch 5–7
Ch 5: NAM coefficient tables (3 time periods)chapter5/.../02_estimate_nam_models.Rchapter5/tables/nam_summary.csv3dp match to thesis (real mode)
Ch 5: Coefficient comparison plotschapter5/.../03_generate_nam_figures.Rchapter5/figures/nam_coefficients.png
Ch 5: Thesis benchmark validationchapter5/.../04_validate_nam_results.Rchapter5/logs/nam_validation.jsonJSON targets in quan_results.md
Ch 6: Injunctive NAM tables (3 scenarios × 3 time periods)chapter6/.../04_estimate_injunctive_nam_models.Rchapter6/tables/injunctive_nam_coefficients.csv63 coefficient checks, 3dp match
Ch 7: SAOM selection/influence estimateschapter7/.../02_run_saom_model.Rchapter7/cache/base_fit.RData, saom_base.txtConvergence ratio ≤ 0.10; Jaccard ≥ 0.30
Ch 7: GoF and convergence diagnosticschapter7/.../03_generate_saom_tables_figures.Rchapter7/figures/, chapter7/logs/saom_diagnostics.jsonMachine-readable convergence report

Abbreviated paths: chapter4/.../ means analyses/chapter4_data_collection/scripts/. All outputs land in reproduced/outputs/.


8. Verification

Proxy runs test execution and artefact structure; empirical differences are warnings, not failures. Real-data runs enforce chapter benchmarks.

TargetWhat it does
make verify-proxy-quickRegenerate proxy data, run Chapters 4–6, verify 15 structural checks
make verify-proxyFull proxy path including Chapter 7 SAOM estimation (~2h)
make verify-realProtected data: Chapters 4–7 with empirical benchmarks and convergence checks
make verifyDispatches to the appropriate target for the current data mode

9. Setup & Tooling Scripts

Under reproduced/scripts/, outside the chapter analysis directories.

00_setup/ — Environment and release

portfolio/ — Public documentation generators

visualisation/ — Network outputs


10. Make Targets

TargetPurpose
make envBootstrap Conda environment + renv library + RSiena 1.4.7
make validate-configCheck thesis.yml for required keys and valid values
make proxy-dataGenerate synthetic proxy inputs
make chapter4make chapter7Run individual chapters
make allRun Chapters 4–7 sequentially
make checkConfiguration validation, R syntax check, Python tests, portfolio suite
make portfolioGenerate data dictionary, manifest, dashboard, network pages
make portfolio-testRun the R portfolio test suite
make privacy-checkScan Markdown/HTML outputs for privacy violations
make rsienaInstall exact RSiena 1.4.7 into project library
make visualiseGenerate interactive network explorers
make docker-buildBuild the Docker image
make cleanRemove generated outputs

11. Common Failure Modes

SymptomCauseFix
make chapter4 fails with missing inputsReal data not stagedStage exports into reproduced/data/raw/, or use make proxy-data + DATA_MODE=proxy
SAOM convergence issues or long runtimesInherent to RSiena estimationSee docs/references/chapter7_saom_restart.md
RSiena version mismatchGlobal R library has a newer versionRun make rsiena to install exact 1.4.7 into project library
Conda environment fails to solveChannel or package availability changeCheck environment.yml against current conda-forge
renv restore failsCRAN mirror or package version unavailableRun make env-renv and check status with renv::status()

Release

Release status and contract. Scope, provenance, data restrictions, environment, validation, and limitations must all be inspectable.

1. Verification Status

Verified on 14 July 2026 · macOS 15.6 (arm64) · Apple M4 · R 4.3.2 · RSiena 1.4.7

CheckResultDetail
Secret/credential scanPassNo protected paths, known secret forms, local absolute paths, or unsafe symlinks
Conda environment solvePassenvironment.yml resolves from declared channels on macOS arm64
Locked R library restorePassrenv.lock restored into clean project library
Python test suitePass11 tests: release-builder, verifier behaviour
R portfolio/integration suitePassDictionary, limits, explorer, integration, privacy, manifest, dashboard
Fast proxy pipeline (Ch 4–6)Pass15 structural checks, 0 failures, 2 expected proxy-vs-empirical warnings
Portfolio generation & privacyPassDictionary, manifest, dashboard, 5 labelled network pages; privacy scans pass
Full Chapter 7 (corrected proxy)OpenFirst proxy run completed but did not converge (ratio=1.10); corrected proxy data produced but rerun not completed
Docker imageOpenDockerfile exists; daemon was unavailable during verification
Hosted CIOpenWorkflows prepared but not run in a published repository

2. Environment

2.1 Conda

Defined in reproduced/environment.yml. Key pins:

PackageVersion
R4.3.2
Python3.11
igraph1.5.1
tidyverse2.0.0
visNetwork2.1.4
renv1.0.7
pandoc3.1.12

2.2 renv

reproduced/renv.lock locks 90 R packages with concrete version pins and hashes. The lock was regenerated from the maintained Chapters 4–7 source tree.

2.3 RSiena

Pinned to exact version 1.4.7 from the CRAN Archive. The installer downloads the source tarball to data/vendor/rsiena/, compiles it, and installs to the project-local .Rlib/ directory. A regression check confirms the activated version matches. The global R library may contain a newer RSiena; the project .Rprofile ensures the local 1.4.7 takes precedence.

2.4 Docker

Dockerfile builds a self-contained image. Not yet verified in the current release cycle.


3. Data Availability

Public: Analysis code, configuration, environment definitions, documentation, schema inventory, synthetic proxy-data generator.

Protected: Participant data. Longitudinal alcohol-use, demographic, residential, and network information. Pseudonymisation does not remove disclosure risk from a bounded social graph with repeated measurements. Not distributed.

Synthetic proxy: Generated by make proxy-data. Uses study-level design parameters to exercise the pipeline. Does not transform, perturb, or anonymise participant rows. Not suitable for substantive inference.

Aggregate results: README figures and tables were cross-checked against thesis Chapters 4–7 on 13 July 2026 (source cross-check, not a fresh protected-data run).

Access: No public access procedure. Future requests must follow institutional governance.


4. Release Contract

Included: Chapters 4–7 pipeline, real/proxy data modes, synthetic data generator, schema documentation, environment locks, thesis-to-code crosswalk, tests, validation reports, citation/contribution/security/data-availability documents, confirmed licence, release manifest.

Excluded: participant data, credentials, private Git history, project-management files, agent instructions, personal notes, unvalidated Chapter 8 claims.

4.1 Current Gates

GateStatus
Remove local secret configuration from tracked treeDone
Replace ambiguous make verify with explicit proxy/real checksDone
CI generates proxy inputs explicitlyDone
Replace placeholder dependency lock; add renv activationDone
Reconcile README, config, chapter status for Ch 4–7Done
Embed provenance in generated network HTML; privacy guard rejects unlabelled pagesDone
Audit candidate for secrets, protected paths, private notes, local pathsDone
Build history-free release candidateDone
Run Chapters 4–6 from clean checkoutDone
Complete Chapter 7 from corrected proxy dataOpen
Confirm code and documentation licenceDone
Test links, citation metadata, installation commandsOpen
CI/Docker verificationOpen
Tag and archiveOpen

4.2 Interpretation Rule

A proxy run proves the software executes on synthetic inputs. It does not prove proxy estimates match thesis results. A real-data run proves agreement with recorded empirical benchmarks, subject to stated tolerances. Release documentation keeps these claims separate.

5. License & Citation

Code: MIT License © 2025 Shangshang Gu

Documentation & diagrams: CC BY 4.0

Data: Not distributed. Synthetic proxy data are covered by the MIT License.

See LICENSE for full text and CITATION.cff for machine-readable citation metadata.


6. Reproduction Fidelity

On the thesis data, Chapters 5 and 6 reproduce every coefficient to 3 decimal places. Three code fixes were required to achieve exact match:

#FixDetail
1Zero-friend peer codingParticipants with friend_number == 0 receive peer_misperception = 0. Participants whose friends all have missing data keep NaN (dropped as incomplete).
2Imputation mean sourceThe mean for single-NA imputation is computed from the flagged subset only, matching the legacy filter(further_imputation==1) pipeline.
3Adjacency normalisationUses diag(1/colSums) %*% adj (legacy normalisation), not standard row-normalisation.

These fixes produce thesis-matching sample sizes (218/213/215 for Time 1/2/3) and exact agreement at 3dp.

6.1 Recorded Validation Targets

ChapterScopeChecksStatus (real data)
Ch 5 (Descriptive NAM)Global and peer misperception β at T1, T2, T36 coefficientsAll match to 3dp
Ch 6 (Injunctive NAM)7 terms × 3 scenarios × 3 time periods63 coefficientsAll match to 3dp
Ch 7 (SAOM)Convergence ratio, Jaccard indices, key effectsConvergence ≤ 0.10; Jaccards 0.67, 0.81, 0.66Converged on thesis data

Machine-readable targets are stored in reproduced/docs/references/quan_results.md and consumed by each chapter’s validation script. Proxy runs cannot reproduce these values because synthetic inputs have different distributions; the verifier issues warnings rather than failures.


7. Verification Check Inventory

The verifier (scripts/00_setup/verify_outputs.py) runs 15 checks for a Chapters 4–6 proxy path, more when Chapter 7 is included.

Check IDWhat it testsFail behaviour
data.proxy_bundlelist_by_wave.RData exists in proxy dirFail
data.proxy_markerProxy marker file presentFail
chapter4.prepared_dataprepared_data_sets.RData exists (> 0 bytes)Fail
chapter4.manifestData manifest is valid JSONFail
chapter4.qaQA assertions file exists and is valid JSONFail
chapter4.data_modeQA records the expected data mode (proxy/real)Fail
chapter4.qa_statusAll Chapter 4 QA assertions passedFail
chapter5.summaryNAM summary CSV existsFail
chapter5.summary_schemaCSV has required columns and > 0 rowsFail
chapter5.benchmarksValidation JSON existsFail
chapter5.benchmark_statusCoefficient check results (proxy: warn if different; real: fail)Warn (proxy) / Fail (real)
chapter6.coefficientsInjunctive NAM coefficients CSV existsFail
chapter6.benchmarksValidation JSON existsFail
chapter6.data_modeValidation records the expected data modeFail
chapter6.benchmark_statusCoefficient check resultsWarn (proxy) / Fail (real)

Chapter 7 adds checks for network arrays, input manifest, run log, dyadic covariates (non-degenerate), fitted model file, and convergence ratio. Real-data runs also verify coefficient benchmarks.


8. Determinism & Platform Drift

Chapters 4–6 are deterministic for fixed inputs and configuration. Chapter 7 (SAOM) may show cross-platform numeric drift from BLAS/LAPACK and compiler differences, even with fixed seeds.

ParameterValue
NAM seed20250921
SAOM RNG seed2022
SAOM Phase 3 iterations10000
RSiena version1.4.7 (exact CRAN Archive pin)

Roadmap

What has been completed and what comes next. Updated July 2026.

1. Completed

ItemStatusDetail
REDCap/MySQL server stackDoneBuilt two-server architecture from bare university VMs: Apache/SSL web server + dedicated MySQL database VM with scoped access and network isolation.
Two-project identity separationDoneImplemented baseline + follow-up REDCap projects with role-based access separation, @HIDDEN-SURVEY/@HIDDEN-FORM action tags, and calculated fields for pseudonymised linkage.
Six-wave data collectionDoneRecruited 255 of 375 invited residents, achieved 87% retention across six waves (Sep 2022–Oct 2023), with automated incentive distribution and up to three reminders per wave.
R/Make analysis pipelineDoneConfig-driven pipeline covering Chapters 4–7: data preparation, network autocorrelation models, injunctive norm models, and stochastic actor-oriented models.
Proxy data generatorDoneDeterministic synthetic data generator producing 255 students × 6 waves with network ties, AUDIT-C scores, norm perceptions, and residence structure.
Environment locksDoneConda environment + renv.lock (90 packages) + RSiena 1.4.7 pinned from CRAN Archive. Clean solve and restore verified.
Chapters 4–6 proxy verificationDone15 structural checks, 0 failures, 2 expected proxy-vs-empirical warnings. Reproducible from a clean checkout.
Portfolio and privacy generationDoneData dictionary, reproducibility manifest, validation dashboard, 5 labelled network pages with embedded SYNTHETIC PROXY DATA provenance. Privacy scans pass.
Secret and credential scanDoneRelease candidate scanned for protected paths, known secret patterns, local absolute paths, and unsafe symlinks. No findings.
History-free release candidateDoneBuilt clean export without private Git history. Private commits do not carry into the public repository.
Thesis coefficient reproductionDoneChapters 5–6 reproduce every coefficient to 3 decimal places on real data (69 checks). Three code fixes required for exact match documented in Release tab.
Infrastructure evidence extractionDoneDatabase backup and server configuration archived. Python scripts parse the backup directly without requiring a running database.
Portable data dictionariesDoneGenerated REDCap-importable CSVs from the database backup: PIS portal (17 fields), baseline (231 fields, 28 instruments), follow-up (239 fields, 8 instruments, 151 branching rules).
Licence and citationDoneMIT (code) + CC BY 4.0 (documentation). CITATION.cff with machine-readable metadata.

2. Next

ItemStatusDetail
Chapter 7 (SAOM) codeIn progressAnalysis complete. Organising and updating pipeline code for public release.
Chapter 8 (Interventions) codeIn progressAnalysis complete. 462 counterfactual scenarios × 3 chained periods. Organising pipeline code.
Thesis compilationIn progressChapters written. Integrating make thesis target into the reproducible pipeline.
Data access procedureIn progressFormal data-sharing agreements and institutional governance under development.
DOI and archived releaseIn progressVersion tag and archived release bundle in preparation.
Cross-platform reproducibilityOpenAll verification performed on macOS arm64. Linux and x86_64 behaviour is untested.