Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/weight_binary.R

Compute weight from the probability of the rank given the effect size for the binary effect size

1 | ```
weight_binary(alpha, et, m, m1, tail = 1L, delInterval = 0.001, ranksProb)
``` |

`alpha` |
Numeric, significance level of the hypothesis test |

`et` |
Numeric, mean effect size of the test statistics |

`m` |
Integer, totoal number of hypothesis test |

`m1` |
Integer, number of true alternative hypothesis |

`tail` |
Integer (1 or 2), right-tailed or two-tailed hypothesis test. default is right-tailed test. |

`delInterval` |
Numeric, interval between the |

`ranksProb` |
Numeric vector of the ranks probability of the tests given the effect size |

If one wants to test

*H_0: epsilon_i=0 vs. H_a: epsilon_i = epsilon,*

then `et`

and `ey`

should be median or any discrete value of the test
and covariate effect sizes, respectively. This is called hypothesis testing for
the Binary effect sizes. `m1`

can be estimated using `qvalue`

from
a bioconductor package `qvalue`

.

`weight`

Numeric vector of normalized weight of the tests for
the binary case

Mohamad S. Hasan, [email protected]

`prob_rank_givenEffect`

`weight_continuous`

`qvalue`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# compute the probabilities of the ranks of a test being rank 1 to 100 if the
# targeted test effect is 2 and the overall mean covariate effect is 1.
ranks <- 1:100
prob2 <- sapply(ranks, prob_rank_givenEffect, et = 2, ey = 1, nrep = 10000,
m0 = 50, m1 = 50)
# plot the prooabbility
plot(ranks, prob2)
# compute weight for the binary case
weight_bin <- weight_binary(alpha = .05, et = 1, m = 100, m1 = 50, tail=1,
delInterval = .0001, ranksProb = prob2)
# plot the weight
plot(ranks, weight_bin)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.