1 Description

This R notebook contains all simulation results referred to in Chapter 5.3 of Markus Jochim’s Internal and external factors in a Bavarian sound change. All simulations have been carried out with version 3bc0dfb of the ABM code. The code is available in the modelscript/ subdirectory of this distribution of supplementary materials or at https://github.com/IPS-LMU/ABM/commit/3bc0dfb194738b614f9757728f44b091d3b53ccd.

The results of the simulations are stored in the logs/ directory, which has eight subdirectories, according to the following code listing:

maximum_contact_scenario_linear    = "ABM20200113145453"
maximum_contact_scenario_log       = "ABM20200113131820"
asymmetric_contact_scenario_linear = "ABM20200118120147"
asymmetric_contact_scenario_log    = "ABM20200116005311"
symmetric_contact_scenario_linear  = "ABM20200117151520"
symmetric_contact_scenario_log     = "ABM20200203161833"
null_contact_scenario_linear       = "ABM20200115170020"
null_contact_scenario_log          = "ABM20200115173019"

The parameters used during the simulations are found in the respective subdirectory in the file params.yaml. Some parameters were set by calculating a formula; in these cases, params.yaml contains only the value and the formula is given in this notebook.

2 Maximum contact scenario

The parameter mahalanobisThreshold was set to qchisq(0.85, df=1).

2.1 Linear dur_c

2.1.1 Amount of input

simulations = maximum_contact_scenario_linear

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

## Warning: Removed 20 rows containing missing values (geom_point).

2.1.2 Parameter over time

simulations = maximum_contact_scenario_linear

additional_plot_parts = c(
  youngdialect_normal_reference_lines,
  agent_population_scale
)

for (run_id in 1:10) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 25,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

2.2 log_dur_c

2.2.1 Amount of input

simulations = maximum_contact_scenario_log

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

## Warning: Removed 20 rows containing missing values (geom_point).

2.2.2 Parameter over time

simulations = maximum_contact_scenario_log

additional_plot_parts = c(
  youngdialect_normal_log_reference_lines,
  agent_population_scale
)

for (run_id in 1:10) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 25,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

3 Asymmetric contact scenario

The parameter mahalanobisThreshold was set to qchisq(0.85, df=1).

3.1 Linear dur_c

3.1.1 Amount of input

simulations = asymmetric_contact_scenario_linear

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

3.1.2 Parameter over time

simulations = asymmetric_contact_scenario_linear

additional_plot_parts = c(
  youngdialect_normal_reference_lines,
  agent_population_scale
)

for (run_id in 1:7) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 15,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

3.2 log_dur_c

3.2.1 Amount of input

simulations = asymmetric_contact_scenario_log

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

3.2.2 Parameter over time

simulations = asymmetric_contact_scenario_log

additional_plot_parts = c(
  youngdialect_normal_log_reference_lines,
  agent_population_scale
)

for (run_id in 1:8) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 500,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

4 Symmetric contact scenario

The parameter mahalanobisThreshold was set to qchisq(0.85, df=1).

4.1 Linear dur_c

4.1.1 Amount of input

simulations = symmetric_contact_scenario_linear

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

4.1.2 Parameter over time

simulations = symmetric_contact_scenario_linear

additional_plot_parts = c(
  youngdialect_normal_reference_lines,
  agent_population_scale
)

for (run_id in c(1:3, 5:8)) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 1500,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

4.2 log_dur_c

4.2.1 Amount of input

simulations = symmetric_contact_scenario_log

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

4.2.2 Parameter over time

simulations = symmetric_contact_scenario_log

additional_plot_parts = c(
  youngdialect_normal_log_reference_lines,
  agent_population_scale
)

for (run_id in 1:7) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 15,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

5 Speech rate / Null contact scenario

The parameter mahalanobisThreshold was set to qchisq(0.85, df=1).

5.1 linear dur_c

5.1.1 Amount of input

simulations = null_contact_scenario_linear

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

## Warning: Removed 20 rows containing missing values (geom_point).

5.1.2 Parameter over time

simulations = null_contact_scenario_linear

additional_plot_parts = c(
  youngdialect_fast_reference_lines,
  agent_population_scale
)

for (run_id in 1:10) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 50,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

5.2 log_dur_c

5.2.1 Amount of input

simulations = null_contact_scenario_log

plotInputDistributionPerAgent(simulations,
                              resultsDirectory,
                              1,
                              labeller = NULL,
                              additional_plot_parts = c(perceiver_population_scale,
                                                        producer_population_scale))
## `summarise()` has grouped output by 'agentID'. You can override using the
## `.groups` argument.

## Warning: Removed 20 rows containing missing values (geom_point).

5.2.2 Parameter over time

simulations = null_contact_scenario_log

additional_plot_parts = c(
  youngdialect_fast_log_reference_lines,
  agent_population_scale
)

for (run_id in 1:10) {
  plotParameterAverageAcrossTime(simulations,
                                 resultsDirectory,
                                 run_id,
                                 central_tendency = "median",
                                 additional_plot_parts = additional_plot_parts,
                                 snapshotStepSize = 50,
                                 labeller = function (currentParameterSet) {})
}
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'group', 'initial'. You can override using
## the `.groups` argument.