Description Usage Arguments Details Value References Examples

Global and local significance test for comparing shapes of multiple SPDs using random permutations.

1 2 3 |

`x` |
A |

`marks` |
A numerical or character vector containing the marks associated to each radiocarbon date. |

`timeRange` |
A vector of length 2 indicating the start and end date of the analysis in cal BP. |

`nsim` |
Number of random permutations |

`bins` |
A vector indicating which bin each radiocarbon date is assigned to. |

`runm` |
A number indicating the window size of the moving average to smooth the SPD. If set to |

`datenormalised` |
If set to TRUE the total probability mass of each calibrated date will be made to sum to unity (the default in most radiocarbon calibration software). This argument will only have an effect if the dates in |

`spdnormalised` |
A logical variable indicating whether the total probability mass of the SPD is normalised to sum to unity. |

`raw` |
A logical variable indicating whether all permuted SPDs should be returned or not. Default is FALSE. |

`verbose` |
A logical variable indicating whether extra information on progress should be reported. Default is TRUE. |

The function generates a distribution of expected SPDs by randomly shuffling the marks assigned to each *bin* (see `spd`

for details on binning). The resulting distribution of probabilities for each *mark* (i.e. group of dates) for each calendar year is z-transformed, and a 95% simulation envelope is computed. Local significant departures are defined as instances where the observed SPD (which is also z-transformed) is outside such envelope. A global significance is also computed by comparing the total "area" outside the simulation envelope in the observed and simulated data.

An object of class `SpdPermTest`

with the following elements

`observed`

A list containing data.frames with the summed probability (column*PrDens*for each calendar year (column*calBP*for each mark/group`envelope`

A list containing matrices with the lower and upper bound values of the simulation envelope for each mark/group`pValueList`

A list of p-value associated with each mark/group

Crema, E.R., Habu, J., Kobayashi, K., Madella, M., (2016). Summed Probability Distribution of 14 C Dates Suggests Regional Divergences in the Population Dynamics of the Jomon Period in Eastern Japan. PLOS ONE 11, e0154809. doi:10.1371/journal.pone.0154809

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
## compare demographic trajectories in Netherlands and Denmark
## Not run:
data(euroevol)
nld.dnk = subset(euroevol,Country=="Netherlands"|Country=="Denmark")
bins = binPrep(nld.dnk$SiteID,nld.dnk$C14Age,h=200)
dates = calibrate(nld.dnk$C14Age,nld.dnk$C14SD,normalised=FALSE)
res = permTest(dates,marks=as.character(nld.dnk$Country),nsim=1000,
bins=bins,runm=200,timeRange=c(10000,4000))
round(res$pValueList,4) #extract p-values
summary(res)
par(mfrow=c(2,1))
plot(res,focalm="Netherlands",main="Netherlands")
plot(res,focalm="Denmark",main="Denmark")
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.