简体   繁体   中英

How to calculate a p value for Williams trend test in r (Similar function of "PROBMC" in SAS)

I want to calculate p values for William trend test in R, given that I have already known the t statistics. In SAS, I can use function PROBMC as shown below

 PROBMC(distribution, q, prob, df, nparms<, parameters>)

Below is an example

       if parameters t=2.6,  k = 6, [nu] = 42, and t = 2.60 then probability is .9924467341.
       using (prob=probmc("williams",2.6,.,42,6);)

Is there a similar function in R to do this?

I think you're probably out of luck.

Using library("sos"); findFn("Williams trend distribution") library("sos"); findFn("Williams trend distribution") and searching through the results finds two packages, PMCMCR and StatCharrms , that have functions to perform the Williams test, but it looks like these only use the tabulated values from the paper to get critical values for p=0.05 - not compute the distribution/p-value directly.

The computation to get the full distribution/p-values looks pretty hairy, making it less likely that someone will have decided to implement it in R. As described in the SAS documentation for the PROBMC function

As described in Williams (1971) (See References ), the full computation is extremely lengthy and is carried out in three stages.

This would make a nice computational statistics project for someone ...

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM