This function performs Test3G.WBWA

test3Gwbwa(X, freq, verbose = TRUE, rounding = 3)

Arguments

X

is a matrix of encounter histories with K occasions

freq

is a vector of the number of individuals with the corresponding encounter history

verbose

controls the level of the details in the outputs; default is TRUE for all details

rounding

is the level of rounding for outputs; default is 3

Value

This function returns a list with first component the overall test and second component a data.frame with occasion, site, the value of the test statistic, degree of freedom, p-value and test performed (chi-square, Fisher or none).

Author

Olivier Gimenez <olivier.gimenez@cefe.cnrs.fr>, Roger Pradel, Rémi Choquet

Examples

# Read in Geese dataset: geese = system.file("extdata", "geese.inp", package = "R2ucare") geese = read_inp(geese) # Get encounter histories and number of individuals with corresponding histories geese.hist = geese$encounter_histories geese.freq = geese$sample_size # perform Test.3GWBWA test3Gwbwa(geese.hist,geese.freq)
#> $test3Gwbwa #> stat df p_val #> 472.855 20.000 0.000 #> #> $details #> occasion site stat df p_val test_perf #> 1 2 1 19.5914428 2 5.568936e-05 Chi-square #> 2 2 2 37.8676763 2 5.986026e-09 Chi-square #> 3 2 3 4.4873614 1 3.414634e-02 Fisher #> 4 3 1 80.5903050 1 2.777187e-19 Chi-square #> 5 3 2 98.7610833 4 1.805369e-20 Chi-square #> 6 3 3 0.8071348 1 3.689687e-01 Fisher #> 7 4 1 27.7054638 1 1.412632e-07 Chi-square #> 8 4 2 53.6936048 2 2.190695e-12 Chi-square #> 9 4 3 25.2931602 1 4.924519e-07 Chi-square #> 10 5 1 43.6547442 1 3.917264e-11 Chi-square #> 11 5 2 50.9264976 2 8.738795e-12 Chi-square #> 12 5 3 29.4763896 2 3.974507e-07 Chi-square #>