Skip to contents

Performs z-tests for Fisher's aggregation indices (computed with either count or incidence data).

Usage

z.test(x, ...)

# S3 method for default
z.test(x, ...)

# S3 method for fisher
z.test(
  x,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95,
  ...
)

Arguments

x

The output of the agg_index function with method = "fisher" as parameter.

...

Not yet implemented.

alternative

A character string specifying the alternative hypothesis. It must be one of "two.sided" (default), "less" or "greater".

conf.level

The confidence level of the interval.

Value

Same kind of object as the one returns by the stats chisq.test function for example.

Details

For two-sided tests with a confidence level of 95 the spatial pattern would be random. If z < -1.96 or z > 1.96, it would be uniform or aggregated, respectively.

References

For count and incidence data:

Moradi-Vajargah M, Golizadeh A, Rafiee-Dastjerdi H, Zalucki MP, Hassanpour M, Naseri B. 2011. Population density and spatial distribution pattern of Hypera postica (Coleoptera: Curculionidae) in Ardabil, Iran. Notulae Botanicae Horti Agrobotanici Cluj-Napoca, 39(2): 42-48.

Sun P, Madden LV. 1997. Using a normal approximation to test for the binomial distribution. Biometrical journal, 39(5): 533-544.

Examples

# For incidence data:
my_incidence <- incidence(tobacco_viruses)
my_fisher <- agg_index(my_incidence, method = "fisher")
z.test(my_fisher)
#> 
#> 	One-sample z-test
#> 
#> data:  my_fisher
#> z = 13.207, p-value < 2.2e-16
#> alternative hypothesis: two.sided
#>