This function performs Test3G.SR

test3Gsr(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>, Rémi Choquet, Roger Pradel

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 Test3.GSR test3Gsr(geese.hist,geese.freq)
#> $test3Gsr #> stat df p_val #> 117.753 12.000 0.000 #> #> $details #> occasion site stat df p_val test_perf #> 1 2 1 3.894777e-03 1 9.502378e-01 Chi-square #> 2 2 2 2.715575e-04 1 9.868523e-01 Chi-square #> 3 2 3 8.129814e+00 1 4.354322e-03 Chi-square #> 4 3 1 1.139441e+01 1 7.366526e-04 Chi-square #> 5 3 2 2.707742e+00 1 9.986223e-02 Chi-square #> 6 3 3 3.345916e+01 1 7.277633e-09 Chi-square #> 7 4 1 1.060848e+01 1 1.125702e-03 Chi-square #> 8 4 2 3.533332e-01 1 5.522323e-01 Chi-square #> 9 4 3 1.016778e+01 1 1.429165e-03 Chi-square #> 10 5 1 1.101349e+01 1 9.045141e-04 Chi-square #> 11 5 2 1.292013e-01 1 7.192616e-01 Chi-square #> 12 5 3 2.978513e+01 1 4.826802e-08 Chi-square #>