This function performs Test3G.SM
test3Gsm(X, freq, verbose = TRUE, rounding = 3)
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 |
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).
Olivier Gimenez <olivier.gimenez@cefe.cnrs.fr>, Roger Pradel, Rémi Choquet
# 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.3.GSm test3Gsm(geese.hist,geese.freq)#> $test3Gsm #> stat df p_val #> 302.769 119.000 0.000 #> #> $details #> occasion site stat df p_val test_perf #> 1 2 1 23.913378 14 4.693795e-02 Fisher #> 2 2 2 24.810007 16 7.324561e-02 Fisher #> 3 2 3 11.231939 8 1.889004e-01 Fisher #> 4 3 1 36.521484 14 8.712879e-04 Fisher #> 5 3 2 21.365358 17 2.103727e-01 Chi-square #> 6 3 3 23.072982 10 1.048037e-02 Fisher #> 7 4 1 55.338866 8 3.793525e-09 Fisher #> 8 4 2 17.172011 11 1.028895e-01 Fisher #> 9 4 3 45.089296 10 2.095523e-06 Chi-square #> 10 5 1 9.061514 3 2.848411e-02 Chi-square #> 11 5 2 5.974357 4 2.010715e-01 Chi-square #> 12 5 3 29.217786 4 7.060092e-06 Chi-square #>