Skip to contents

For large samples (n >=25) i performs are parametric estimate based on sample_circular_dispersion(). For smaller size samples, it returns a bootstrap estimate.

Usage

confidence_interval_fisher(
  x,
  conf.level = 0.95,
  w = NULL,
  axial = TRUE,
  na.rm = TRUE,
  boot = FALSE,
  R = 1000L,
  quiet = FALSE
)

Arguments

x

numeric vector. Values in degrees, for which the mean, median or standard deviation are required.

conf.level

Level of confidence: \((1 - \alpha \%)/100\). (0.95 by default).

w

(optional) Weights. A vector of positive numbers, of the same length as x.

axial

logical. Whether the data are axial, i.e. pi-periodical (TRUE, the default) or directional, i.e. \(2 \pi\)-periodical (FALSE).

na.rm

logical value indicating whether NA values in x should be stripped before the computation proceeds.

boot

logical. Force bootstrap estimation

R

positive integer. The number of bootstrap replicates (1000 by default).

quiet

logical. Prints the used estimation (parametric or bootstrap).

Value

list

References

N.I. Fisher (1993) Statistical Analysis of Circular Data, Cambridge University Press.

Examples

# Example data from Davis (1986), pp. 316
finland_stria <- c(
  23, 27, 53, 58, 64, 83, 85, 88, 93, 99, 100, 105, 113,
  113, 114, 117, 121, 123, 125, 126, 126, 126, 127, 127, 128, 128, 129, 132,
  132, 132, 134, 135, 137, 144, 145, 145, 146, 153, 155, 155, 155, 157, 163,
  165, 171, 172, 179, 181, 186, 190, 212
)
confidence_interval_fisher(finland_stria, axial = FALSE)
#> Parametric estimate
#> $mu
#> [1] 129.1903
#> 
#> $conf.angle
#> [1] 7.246797
#> 
#> $conf.interval
#> [1] 121.9435 136.4371
#> 
confidence_interval_fisher(finland_stria, axial = FALSE, boot = TRUE)
#> Bootstrap estimate based on 1000 replicates
#> $mu
#> [1] 129.1298
#> 
#> $conf.angle
#> [1] 5.767129
#> 
#> $conf.interval
#> [1] 123.0808 134.7703
#> 

data(san_andreas)
data("nuvel1")
PoR <- subset(nuvel1, nuvel1$plate.rot == "na")
sa.por <- PoR_shmax(san_andreas, PoR, "right")
confidence_interval_fisher(sa.por$azi.PoR, w = weighting(san_andreas$unc))
#> Parametric estimate
#> $mu
#> [1] 140.8843
#> 
#> $conf.angle
#> [1] 1.7554
#> 
#> $conf.interval
#> [1] 139.1289 142.6397
#> 
confidence_interval_fisher(sa.por$azi.PoR, w = weighting(san_andreas$unc), boot = TRUE)
#> Bootstrap estimate based on 1000 replicates
#> $mu
#> [1] 140.8695
#> 
#> $conf.angle
#> [1] 0.7142139
#> 
#> $conf.interval
#> [1] 140.1777 141.5633
#>