testHostSwitch: Test for the significance of the difference between two...

Description Usage Arguments Details Value Examples

View source: R/testHostSwitch.R

Description

Test for the significance of the difference between two difference of two HostSwitch objects

Usage

1
2
3
4
5
6
7
8
testHostSwitch(
  simulated_quantities1,
  simulated_quantities2,
  parameter,
  test,
  warmup = NULL,
  plot = FALSE
)

Arguments

simulated_quantities1

An object created by simHostSwitch

simulated_quantities2

An object created by simHostSwitch

parameter

Quantity of interest, possible values are:

  • "j" for total number of dispersing events (or jumps)

  • "s" for total number of successful host switch events

  • "d" for distance between the pRes_sim and pRes_new_sim in case of host switch

test

Statistical test, available tests are:

  • ”t” for t-test (parametric)

  • ”w” for Wilcoxon-test (non-parametric)

warmup

Number of warmup steps to be excluded when comparing models, see details. Possible value are NULL (default) or positive integer (min=1,max=50).

plot

If TRUE, a boxplot is drawn. Default = FALSE.

Details

This function tests the significance of the difference between two objects generated by simHostSwitch function. Warmup represents the initial condition that we want to exclude from the test. The initial condition corresponds to the number of generations (n_generations): warmup = 1 means that the generation at time 0 is excluded from comparison; warmup = 2 means generations at times 0 and 1 are excluded and so on. If warmup = NULL all generations are considered for comparison, i.e. initial condition is not considered.

Value

An object of class testHostSwitch

Examples

1
2
3
4
m1 = simHostSwitch(n_generations=100,n_sim=100)
m2 = simHostSwitch(n_generations=50,n_sim=50)
testHostSwitch(simulated_quantities1=m1,simulated_quantities2=m2,
parameter="j",test="t",plot=TRUE)

HostSwitch documentation built on Sept. 27, 2021, 9:06 a.m.