[R] Wilcoxon Rank test of Package Coin

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[R] Wilcoxon Rank test of Package Coin

Jue.Wang2
Hi,

I am running the following example which can be found on page 12 of the pdf file of COIN package

wt<-wilcox_test(pd~age,data=water_transfer,distribution="exact", conf.int=TRUE)

"wt" actually contains the estimate of difference in location and the confidence interval of it.  I am just wondering how can I extract these values? From the examples, I understand that the Wilcoxon statistic can be extracted as
statitic(wt,"linear")
and the exact two-sides p-value can be extracted as
pvalue(wt)

But I haven't been able to find the correct function to extract the estimates of difference median of y-x) and the confidence interval of this estimates. Shall I go back to the  package ExactRankTest? I do know how to extracted these values from function wilcox.exact there.

Thank you
 

Jue Wang, Biostatistician
Contracted Position for Preclinical & Research Biostatistics
PrO Unlimited
(908) 231-3022

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Wilcoxon Rank test of Package Coin

Henric Nilsson
[hidden email] wrote:

> Hi,
>
> I am running the following example which can be found on page 12 of
> the pdf file of COIN package
>
> wt<-wilcox_test(pd~age,data=water_transfer,distribution="exact",
> conf.int=TRUE)
>
> "wt" actually contains the estimate of difference in location and the
> confidence interval of it.  I am just wondering how can I extract
> these values? From the examples, I understand that the Wilcoxon
> statistic can be extracted as statitic(wt,"linear") and the exact
> two-sides p-value can be extracted as pvalue(wt)
>
> But I haven't been able to find the correct function to extract the
> estimates of difference median of y-x) and the confidence interval of
> this estimates.

Take a look at the help page for `wilcox_test', where it's clearly
spelled out in the `Value:' section that "...Confidence intervals can be
extracted by 'confint'."

 > confint(wt)
95 percent confidence interval:
  -0.76  0.15
sample estimates:
difference in location
                 -0.305

> Shall I go back to the  package ExactRankTest? I do
> know how to extracted these values from function wilcox.exact there.

Compared to `coin', the `exactRankTests' package is very limited in
function.


HTH,
Henric



>
> Thank you
>
>
> Jue Wang, Biostatistician Contracted Position for Preclinical &
> Research Biostatistics PrO Unlimited (908) 231-3022
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
> posting guide http://www.R-project.org/posting-guide.html and provide
> commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.