View source: R/cochran.qtest.R
cochran.qtest | R Documentation |
Performs the Cochran's Q test for unreplicated randomized block design experiments with a binary response variable and paired data. If the p-value of the test is significant, the function performs pairwise comparisons by using the Wilcoxon sign test.
cochran.qtest(formula, data, alpha = 0.05, p.method = "fdr")
formula |
a formula of the form |
data |
an optional data frame containing the variables in the formula |
alpha |
significance level to compute pairwise comparisons. |
p.method |
method for p-values correction. See help of |
If the response is a 0/1 variable, the probability of the '1' group is tested. In any other cases, the response is transformed into a factor and the probability of the second level is tested.
method.test |
a character string giving the name of the global test computed. |
data.name |
a character string giving the name(s) of the data. |
alternative |
a character string describing the alternative hypothesis. |
estimate |
the estimated probabilities. |
null.value |
the value of the difference in probabilities under the null hypothesis, always 0. |
statistic |
test statistics (Pearson's Chi-squared test only). |
parameter |
test degrees of freedom (Pearson's Chi-squared test only). |
p.value |
p-value of the global test. |
alpha |
significance level. |
p.adjust.method |
method for p-values correction. |
p.value.multcomp |
data frame of pairwise comparisons result. |
method.multcomp |
a character string giving the name of the test computed for pairwise comparisons. |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
response <- c(0,1,1,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,0,1,1,0,0,1)
fact <- gl(3,1,30,labels=LETTERS[1:3])
block <- gl(10,3,labels=letters[1:10])
cochran.qtest(response~fact|block)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.