Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly remove pupsilon from sr_unpaired_test #11

Open
shabbychef opened this issue Oct 7, 2018 · 3 comments
Open

Possibly remove pupsilon from sr_unpaired_test #11

shabbychef opened this issue Oct 7, 2018 · 3 comments
Assignees
Milestone

Comments

@shabbychef
Copy link
Owner

The pupsilon code is suspect, as the higher order cumulants may not be small enough to support truncation. Possibly this code should be replaced by a simulation based approach?

@shabbychef shabbychef added this to the 1.3. milestone Oct 7, 2018
@shabbychef shabbychef self-assigned this Oct 7, 2018
@JoeOD
Copy link

JoeOD commented Apr 19, 2019

Hello, I see there are some open issues for the sr_unpaired_test function. Would you consider it safe/advisable to use the function?

@shabbychef
Copy link
Owner Author

I would guess that this test currently does not reach the nominal type I rate, but I have not had the time to perform the simulations. Perhaps I can do those easily.

@shabbychef
Copy link
Owner Author

There may be problems with smaller sample sizes or in
the case of multiple contrasts or multiple SRs, but
this looks good to me so far:

library(SharpeR)
set.seed(1234)
allpv <- replicate(1000,
{
  x1 <- rnorm(100)
  x2 <- rnorm(50)
  srs <- list(as.sr(x1),as.sr(x2))
  sr_unpaired_test(srs)$p.value
})
plot(ecdf(allpv))
# or:
library(txtplot)
xv <- ppoints(1000)
yv <- ecdf(allpv)(xv)
txtplot(xv,yv,width=80)
    +--+-------------+-------------+------------+-------------+------------+---+
  1 +                                                                   ****   +
    |                                                                ****      |
    |                                                           ******         |
0.8 +                                                       *****              +
    |                                                   *****                  |
    |                                               *****                      |
0.6 +                                           *****                          +
    |                                       *****                              |
    |                                   *****                                  |
    |                               *****                                      |
0.4 +                           *****                                          +
    |                       *****                                              |
    |                   *****                                                  |
0.2 +              ******                                                      +
    |          *****                                                           |
    |      *****                                                               |
  0 +  *****                                                                   +
    +--+-------------+-------------+------------+-------------+------------+---+
       0            0.2           0.4          0.6           0.8           1    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants