View source: R/compareSurveysLRT.R
compareSurveysLRT | R Documentation |
Compare two or more surveys on the basis of their shape parameters using a Likelihood Ratio Test
compareSurveysLRT(...)
... |
two or more objects of class |
This function **only** works for the zeta distribution. The function carries out a likelihood ratio test (LRT) to test the null hypothesis
H_0: \alpha_1 = \alpha_2 = \ldots = \alpha_K
versus the alternative
H_1: \alpha_i \neq \alpha_j \mbox{ for some } i \neq j \in \left\{1, \ldots, K\right\},
where \alpha_i
is the shape parameter for the zeta distribution of the i^\mathrm{th}
survey.
The function returns a list
of class "htest"
with the following elements:
statistic
– the test statistic.
parameter
– the degrees of freedom for the test
p.value
– the P-value associated with the estimate.
method
– a character string describing the method hypothesis.
data.name
– the names of the data sets used in the test
data(Psurveys)
lau = Psurveys$lau
jackson = Psurveys$jackson
compareSurveysLRT(lau, jackson)
## Example with three surveys
roux = Psurveys$roux
compareSurveysLRT(lau, jackson, roux)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.