p2pTest | R Documentation |
Test for evaluating the difference in the summed probability values associated with two points in time.
p2pTest(x, p1 = NA, p2 = NA, interactive = TRUE, plot = FALSE)
x |
result of |
p1 |
calendar year (in BP) of start point. |
p2 |
calendar year (in BP) of end point. |
interactive |
if set to TRUE enables an interactive selection of p1 and p2 from a graphical display of the SPD. Disabled when |
plot |
if set to TRUE the function plots the location of p1 and p2 on the SPD. Default is FALSE. |
The function compares observed differences in the summed probability values associated with two points in time against a distribution of expected values under the null hypothesis defined with the modelTest
function. The two points can be specified manually (assigning BP dates to the arguments p1
and p2
) or interactively (clicking on a SPD plot). Note that modelTest
should be executed setting the argument raw
to TRUE
(default is FALSE
).
A list with: the BP dates for the two points and the p-value obtained from a two-sided test.
Edinborough, K., Porcic, M., Martindale, A., Brown, T.J., Supernant, K., Ames, K.M., (2017). Radiocarbon test for demographic events in written and oral history. PNAS 201713012. doi:10.1073/pnas.1713012114
modelTest
.
## Example with Younger Dryas period Near East, including site bins
## Not run:
data(emedyd)
caldates <- calibrate(x=emedyd$CRA, errors=emedyd$Error, normalised=FALSE)
bins <- binPrep(sites=emedyd$SiteName, ages=emedyd$CRA, h=50)
nsim=10 #toy example
expnull <- modelTest(caldates, errors=emedyd$Error, bins=bins, nsim=nsim, runm=50,
timeRange=c(16000,9000), model="exponential", datenormalised=FALSE, raw=TRUE)
p2pTest(x=expnull,p1=13000,p2=12500) #non-interactive mode
p2pTest(x=expnull) #interactive mode
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.