

\documentclass[11pt]{article}
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage[english]{babel}
\usepackage{graphicx}

\usepackage{sectsty}
\chaptertitlefont{\huge}

\usepackage[combine]{ucs} % For German characters in references (solidarität)
\usepackage[super]{nth} % Creates superscripts for numbers (e.g. 1st 2nd)
%\usepackage[utf8x]{inputenc}
\usepackage{pdflscape} % Allow landscape pages
\usepackage{afterpage} % For correlation table
\usepackage{enumitem}
\usepackage[singlelinecheck=false, % Overwrite latex default of centering single line table titles
labelfont = sl, 
labelsep = period]{caption} 
\usepackage[bottom]{footmisc} % allow footnotes on bottom of page
\usepackage{endnotes}
%	\let\footnote=\endnote

% Blind footnotes (without number) for chapter footnotes
\newcommand\blfootnote[1]{%
	\begingroup
	\renewcommand\thefootnote{}\footnote{#1}%
	\addtocounter{footnote}{-1}%
	\endgroup
}

\usepackage{authblk} % Author notes and affiliations
\usepackage{setspace}
\doublespacing % or singlespacing/doublespacing
\usepackage{eurosym}
\usepackage{gensymb} % degree symbol

\usepackage[fleqn]{amsmath}
\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu} % in math mode
\newcommand{\textoverline}[1]{$\overline{\mbox{#1}}$} % in text


% Tables and figures
\usepackage[section]{placeins} % tables and figures within section
%\usepackage{siunitx}
\usepackage{dcolumn} % align on decimal marker
\newcolumntype{Z}{D{.}{.}{3}} % round at 3 decimals
\newcolumntype{K}{D{,}{,}{5}} % comma as decimal marker
\newcolumntype{Y}{D{.}{.}{-2}} % round at 2 decimals
\newcolumntype{b}{X}
\newcolumntype{s}{>{\hsize=.5\hsize}X}
\newcolumntype{t}{>{\hsize=.5\hsize}s}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\newcolumntype{Q}{>{\hsize=.5\hsize}L}
\newcolumntype{R}{>{\hsize=.75\hsize}L}	
%\newcolumntype{n}{>{\hsize=.5\hsize}m}
%\usetikzlibrary{arrows.meta, decorations.pathreplacing, shadows}
\usepackage{threeparttable}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{multirow} % Make cell span multiple rows
\usepackage{makecell} % Multiple lines in cell
\usepackage{stackengine} % change row height
\newcommand\xrowht[2][0]{\addstackgap[.5\dimexpr#2\relax]{\vphantom{#1}}}
\usepackage{colortbl} % Color cells in table
\usepackage{xcolor} % allows text in different colors
\definecolor{rpurple}{RGB}{68, 1, 84}
\definecolor{rgreen}{RGB}{39, 126, 142}
\definecolor{ryellow}{RGB}{154, 217, 60}
\definecolor{expred}{RGB}{222, 22, 22}
\definecolor{expgreen}{RGB}{76, 175, 80}
\definecolor{hglgrey}{RGB}{89,89,89}
\definecolor{hghgrey}{RGB}{140,140,140}
\definecolor{gray70}{RGB}{179,179,179}
\definecolor{gray45}{RGB}{115,115,115}
\definecolor{gray15}{RGB}{38,38,38}
\usepackage{soul} %highlight
\usepackage{pgfplots}
\usepackage{subfig} % subfigures


\usepackage{geometry}
\raggedbottom % No extra space between paragraphs
\usepackage[thmmarks, amsmath, thref]{ntheorem}
\makeatletter %

% References
%\usepackage[pagebackref=true]{hyperref}
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
\urlstyle{rm}


\usepackage[nottoc,numbib]{tocbibind} % Bibliography as chapter
\usepackage[nodoi,mask,nosectionbib]{apacite}
\renewcommand\refname{\bf References}
%\let\cite\shortcite % >3 authors immediately abbreviated to et al
\let\citeA\shortciteA
\let\citeauthor\shortciteauthor
%\makeatletter
%\renewcommand{\APACbVolEdTR}[2]{%
%	\ifx\@empty#1\@empty
%	\ifx\@empty#2\@empty
%	\else%
%	\unskip\hbox{}%            (Technical Report No.\ <no>)
%	\fi%
%	\else%
%	({#1}%               (2nd ed., Vol.~1
%	\ifx\@empty#2\@empty%
%	\else%
%	\unskip; {#2}%     ; Technical Report No.\ <no>
%	\fi%
%	)%                   Final parenthesis.
%	\fi%
%}
%\makeatother
\bibliographystyle{apacite}

% Hypotheses
\newtheoremstyle{hypotheses}%
{\item[\hskip\labelsep \theorem@headerfont ##1##2\theorem@separator]}%
{\item[\hskip\labelsep \theorem@headerfont ##1##2\ (##3)\theorem@separator]}
\makeatother

\theoremstyle{hypotheses}
\theoremseparator{:}
\theoremindent1\parindent
\newtheorem{hyp}{Hypothesis } 
%\numberwithin{hyp}{chapter}
\newtheorem{ass}{Assumption }
%\numberwithin{ass}{chapter}

\usepackage{etoolbox}
%\patchcmd{\chapter}{plain}{empty}{}{} % Don't number chapter title pages	

%\usepackage{minted}
%	\usemintedstyle[netlogo]{Nlogo}
\usepackage{listings}

\lstset{ 
	basicstyle=\footnotesize,
	%comment={;}
	morecomment=[l][\color{gray45}];
	%commentstyle=\color{gray}
}


\begin{document}
	
	\title{Sharing Risk under Heterogeneity: Exploring Participation Patterns in Situations of Incomplete Information
	}
	
	%\titlerunning{Short form of title}        % if too long for running head
	
	\author{ }
	
	%\authorrunning{Short form of author list} % if too long for running head
	
	
	\maketitle


The Supplementary Materials include (\ref{s.equations}) further details about the formal modal construction; \ref{s.netlogo} the NetLogo simulation code; and (\ref{s.distributions}) figures detailing the distribution of the proportion of members and average risk for several rounds of the simulation runs. 

\newpage
\section{Model Construction}
\label{s.equations}
In the basic RSM, the expected utilities of participating ($m = 1$) and not participating ($m = 0$) are: 

\begin{align*} 
EU = 
\begin{cases}
(1 - p_i)Y + p_i y & \text{if } m = 0\\
(1 - p_i)(Y - c + \hat{\delta}_i) + p_i(y + b - c + \hat{\delta_i}) & \text{if } m = 1.
\end{cases}
\end{align*}

\noindent Agents will participate if:

\begin{align*}
EU(m=1) &\geq EU(m=0) \\
(1 - p_i)(Y - c + \hat{\delta}_i) + p_i(y + b - c + \hat{\delta_i}) &\geq (1 - p_i)Y + p_i y \\
-c + p_i b + \hat{\delta}_i &\geq 0.
\intertext{ If we then rewrite $\hat{\delta}_i = c - \hat{p}_i b - \frac{(\hat{p}_i - p_i)b}{n}$ we obtain}
-c + p_i b + c - \hat{p}_i b - \frac{(\hat{p}_i - p_i)b}{n} &\geq 0 \\
p_i(b - \frac{b}{n}) &\geq \hat{p}_i(b - \frac{b}{n}).
\intertext{ Solidarity is included as parameter $\alpha$ compensating for the costs of supporting other group members. Rewriting $\beta = b- \frac{b}{n}$ this means}
p_i \beta &\geq (1 - \alpha)\hat{p}_i \beta \\
\alpha \hat{p}_i \beta &\geq \hat{p}_i \beta - p_i \beta \\
\alpha &\geq \frac{\hat{p}_i - p_i}{p_i}.
\end{align*}

\noindent Finally, if we include all revised terms in the original equation and add risk aversion, the utility functions read: 

\begin{align*}
EU = 
\begin{cases}
(1 - p_i)Y^{(1-r)} + p_i y^{(1-r)}, & \text{if } m = 0\\
(1-p_i) (Y - (1 - \alpha)\hat{p}_i \beta)^{(1-r)} + p_i (y + \beta - (1-\alpha)\hat{p}_i \beta)^{(1-r)} & \text{if } m = 1
\end{cases}
\end{align*}

\newpage
\section{NetLogo Simulation Code} \label{s.netlogo}
\begin{lstlisting}
breed [ agents an-agent ]

agents-own [
participate?
risk
needs-support?
estimated-risk
estimated-risk-previous
ci-participate?
ci-average-risk
ci-average-risk-previous
]

globals [
num-support
number-of-members
number-of-members-previous
ci-number-of-members
number-of-stable-rounds
]

to setup
clear-all
set-default-shape turtles ``face happy''

if fix-seed? [ random-seed behaviorspace-run-number ]

create-agents number-of-agents [
set color green
move-to one-of patches with [not any? agents-here]

set risk (random-float (0.3 - 2 * minimum-risk) + minimum-risk)
if debug? [ print risk ]
]

; Base first decision on hypothetical number of members: 
; entire agent population
set number-of-members count agents
set ci-number-of-members count agents

reset-ticks
end

to go
if all? agents [ member? color [ white ] ] [ 
; Condition 1: stop if all agents are white
;stop 
]
if number-of-stable-rounds = 60 [ 
; Condition 2: after 120 rounds: stop if 60 ticks without change 
; in number of members
stop
]

ask agents with [ color != white ] [ 
; Only if agents are participating (color != white)

; Step 1: Realization of who needs support -> start from round > 1
ifelse ticks > 1 [
set needs-support random-float 1 <= risk
] [  
set needs-support false
]

ifelse needs-support = true [
set color red
set shape ``face sad''
] [
set color green
set shape ``face happy''
]
]

; Robustness check: what if 50% needs support in round 50?
if shock? and member? ticks ( range 50 (50 + number-of-shocks) ) [ 
if debug? [ print (word ``External correlated shock for ''
number-of-shocks `` rounds.'') ]
ask n-of ( count agents with [ color != white ] / 2 ) agents with [
color != white 
] [
set needs-support? true
set color red
set shape ``face sad''
]
]

; Go back to observer level to count total number of agents that need support
set num-support count agents with [ color = red ]
if debug? [ print word "Total support = " num-support ]

ask agents with [ color != white ] [ 
; Step 2: Decide whether or not to (continue to) participate
decide-to-participate
if participate? = false [
set color white
set shape ``face neutral''
]
]
set number-of-members count agents with [ color != white ]
if debug? [ print (word "Number of members = " count agents with 
[ color != white ]) ]

; Comparison: participation decisions if full information
if ticks = 0 [ ask agents [
set ci-participate? true
] ]
ask agents with [ ci-participate? ] [ ci-decide-to-participate ]
set ci-number-of-members count agents with [ ci-participate? ]

; After 120 rounds (10 years) -> check if decision-making is stable. 
; As soon as 60 stable rounds: stop (For stable groups >= 180 rounds)
if ticks >= 120 [
check-if-members-changed
]
set number-of-members-previous number-of-members

tick
end

to decide-to-participate
ifelse number-of-members > 1 [
ifelse ticks = 1 [
set estimated-risk risk
] [
ifelse needs-support? [
set estimated-risk ( 1 - learning ) * estimated-risk-previous +
learning * ( ( num-support - 1 ) / number-of-members )
if debug? [ print word "For red agents ki = " (num-support - 1) ]
] [
set estimated-risk ( 1 - learning ) * estimated-risk-previous +
learning * ( num-support / number-of-members )
if debug? [ print word "For green agents ki = " num-support ]
]
]
set estimated-risk-previous estimated-risk 
; already assign value to this variable to be used in next round

let eu-participation ( risk * ( beta - ( 1 - solidarity ) * estimated-risk 
* beta ) ^ ( 1 - risk-aversion ) + (1 - risk) * (income - (1 -
solidarity) * estimated-risk * beta) ^ ( 1 - risk-aversion ) )
let eu-noparticipation ( risk * 0 ^ ( 1 - risk-aversion ) + ( 1 - risk ) 
* income ^ ( 1 - risk-aversion ) )

if debug? [ print word ``expected utility participation = '' 
eu-participation ]
if debug? [ print word ``expected utility no participation = '' 
eu-noparticipation ]

ifelse eu-participation >= eu-noparticipation [ 
set participate? true 
] [ 
set participate? false 
]
if debug? [ print word ``participate = '' participate? ]
] [
; if one member left -> RSG failed, participate = 0
set participate? false
]

end

to-report %-of-members
report number-of-members / number-of-agents * 100
end

to check-if-members-changed
ifelse number-of-members = number-of-members-previous [
set number-of-stable-rounds number-of-stable-rounds + 1
] [
set number-of-stable-rounds 0
]
if debug? [ print (word ``Number of stable rounds at tick '' 
ticks `` = '' number-of-stable-rounds) ]
end

to-report average-estimated-risk
ifelse number-of-members >= 1 [
report mean [ estimated-risk ] of turtle-set agents with 
[ color != white ]
] [
report 0
]
end

to-report average-risk
ifelse number-of-members >= 1 [
report mean [ risk ] of turtle-set agents with [ color != white ]
] [
report 0
]
end

to ci-decide-to-participate
let beta (benefit - benefit / ci-number-of-members )
let ci-participation ( risk * (beta - (1 - solidarity) * ci-risk 
* beta) ^ ( 1 - risk-aversion ) + (1 - risk) * (income - (1 - 
solidarity) * ci-risk * beta) ^ ( 1 - risk-aversion ) )
let ci-noparticipation ( risk * 0 ^ ( 1 - risk-aversion ) + (1 - risk) 
* income ^ ( 1 - risk-aversion ) )
ifelse ci-participation >= ci-noparticipation [ 
set ci-participate? true 
] [ 
set ci-participate? false 
]
end

to-report ci-%-of-members
report ci-number-of-members / number-of-agents * 100
end

to-report ci-risk
ifelse ticks <= 1 [
report mean [ risk ] of turtle-set agents
] [
ifelse ci-number-of-members >= 1 [
report mean [ risk ] of turtle-set agents with [ ci-participate? ]
] [
report 0
]
]
end

\end{lstlisting}

\newpage
\section{Distributions Obtained from the Simulation Runs}
\label{s.distributions}
\Cref{f.dist-memb} shows the distribution of the proportion of members of all $324 \times 50 = 16,200$ agent populations for time points $\tau \in \{2,6,12,24,60,180\}$. Most observations are clustered either at the far left (empty RSGs) or at the far right (complete RSGs). The general pattern is a rapid decrease of the number of complete groups in the first round, resulting in a variety of in-between categories. While the middle and high heterogeneity conditions end up with the highest peak around an empty mutual group, there are also groups that find stability with a proportion of members around 70\% (high heterogeneity) and 85\% (intermediate heterogeneity). For the most homogeneous need category the highest peak continues to lie around complete mutual groups even towards round $T = 180$.

\Cref{f.dist-pj} shows the distribution of average need for all groups of $n \geq 2$ agents (i.e., existing groups) at time points $\tau \in \{2,6,12,24,60,180\}$. It shows that the three heterogeneity conditions start from three neat random distributions with an average of $p = 0.15$, but develop a rightly skewed tail from round 6 onwards already. For the intermediate and highest heterogeneity conditions the distribution flattens out and no longer has a clear peak. The most homogeneous group remains almost normally distributed across the original mean.

\begin{figure}[t]
	\centering
	\includegraphics[width = \textwidth]{distr_member.pdf}
	\caption[Distribution of proportion of members]{Distribution of proportion of members $n/N$ at time points $\tau \in \{2,6,12,24,60,180\}$}
	\label{f.dist-memb}
\end{figure}

\begin{figure}[t]
	\centering
	\includegraphics[width = \textwidth]{distr_pj.pdf}
	\caption[Distribution of average need probability]{Distribution of average need probability $\overbar{p}$ at time points $\tau \in \{2,6,12,24,60,180\}$}
	\label{f.dist-pj}
\end{figure}
\end{document}