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

View source: R/weight_continuous.R

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

1 | ```
weight_continuous(alpha, et, m, 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 |

`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 ranks probability of the tests given the effect size |

If one wants to test

*H_0: epsilon_i = 0 vs. H_a: ε_i > 0,*

then `et`

and `ey`

should be mean value of the test and covariate
effect sizes, respectively. This is called hypothesis testing for the continuous
effect sizes.

`weight`

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

Mohamad S. Hasan, [email protected]

`prob_rank_givenEffect`

`weight_binary`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# 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 continuous case
weight_cont <- weight_continuous(alpha = .05, et = 1, m = 100, tail = 1,
delInterval = .0001, ranksProb = prob2)
# plot the weight
plot(ranks, weight_cont)
``` |

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.