randomTest: Significance test against the null hypothesis of random...

randomTestR Documentation

Significance test against the null hypothesis of random orientation

Description

Significance test against the null hypothesis of random orientation

Usage

randomTest(
  pdf,
  .res = 0.1,
  nsims = 1000,
  conf = 0.95,
  tails = 2,
  normalise = F,
  ncores = parallel::detectCores() - 1,
  verbose = T,
  hor,
  refraction,
  atm,
  temp
)

Arguments

pdf

A skyscapeR.pdf object created with either az.pdf or coordtrans

.res

(Optional) Resolution with which to output probability distribution(s). Default is 0.1 degrees.

nsims

(Optional) Number of simulations to run. Default is 1000.

conf

(Optional) Confidence envelope (in percentage) of the null model to calculate. Default is .95

tails

(Optional) Whether to calculate 1-tailed p-value (greater than) or 2-tailed p-value (smaller than or greater than). Default is 2.

normalise

(Optional) Boolean to control whether to normalize SPDs. Default is FALSE

ncores

(Optional) Number of CPU cores to use. Default is the number of available cores minus 1.

verbose

(Optional) Boolean to control whether or not to display text. Default is TRUE.

hor

(Optional) A single skyscapeR.horizon object created with createHor or downloadHWT. This and the following arguments are only needed if pdf contains only azimuths. If provided, the code will assume that all azimuthal measurements are for the same site with horizon given in hor and that the user want to run the significance test in declination. Coordinate transformation will therefore be done automatically.

refraction

(Optional) Whether atmospheric refraction is to be taken into account. If not given the value set by skyscapeR.vars will be used instead.

atm

(Optional) Atmospheric pressure for refraction calculation. If not given the value set by skyscapeR.vars will be used instead.

temp

(Optional) Atmospheric temperature for refraction calculation. If not given the value set by skyscapeR.vars will be used instead.

References

Silva, F (2020) A probabilistic framework and significance test for the analysis of structural orientations in skyscape archaeology Journal of Archaeological Science 118, 105138. <doi:10.1016/j.jas.2020.105138>

Examples

## Not run: 
# significance test for azimuth
Az <- az.pdf(az=c(87,93,90,110), unc=3)
st1 <- randomTest(Az, nsims=1000)
plot(st1)

# significance test for declination
hor <- createHor(az=c(0,360), alt=c(0,0), loc=c(35,-8,25)) # flat horizon with 0 degrees of altitude
Dec <- coordtrans(Az, hor)
st2 <- randomTest(Dec, nsims=1000)
plot(st2)

## End(Not run)

f-silva-archaeo/skyscapeR documentation built on Sept. 24, 2023, 8:14 p.m.