Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/probRel_CovVsTest_effect.R
Compute the relationship between the covariate and test effect sizes in terms of the ranks probability of the covariate given the test effect sizes
1 | probRel_CovVsTest_effect(r, rho, H0, ed, m0, m1, n_ey = 100)
|
r |
Integer, rank of the covariate |
rho |
Numeric, correlation between the covariate and the test efect sizes |
H0 |
Binary 0 or 1, determine the null or the alternative hypotheisis; H0 = 0 if null and H0 = 1 if alternative |
ed |
Numeric, mean effect size of the test statistics |
m0 |
Integer, number of true null hypothesis |
m1 |
Integer, number of the true alternative hypothesis |
n_ey |
Integer, number of covariate-effects to be generated |
Compute the relationship between the covariate and the test effect sizes in terms of the ranks probability of the covariate given the test effect sizes. The weight identity is based on the test effect size; however, the ranks probability needs to compute from the covariate effects. Therefore, it is expected that there is a relationship between the covariate and test effect sizes.
prob
A numeric value of the ranks probability of the test
given the mean test effect
Mohamad S. Hasan, shakilmohamad7@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ranks = 1:10
prob_test0 <- sapply(ranks, probRel_CovVsTest_effect, rho = .8,
H0 = 0, ed = 2, m0 = 9, m1 = 1)
# prob_test1 <- sapply(ranks, probRel_CovVsTest_effect, rho=.8,
# H0 = 1, ed = 2, m0 = 9, m1 = 1)
# prob0 <- sapply(ranks, prob_rank_givenEffect, et = 0, ey = 2,
# m0 = 9, m1 = 1)
# prob1 <- sapply(ranks, prob_rank_givenEffect, et = 2, ey = 2,
# m0 = 9, m1 = 1)
# matplot(1:10, cbind(prob_test0, prob_test1, prob0, prob1),
# type = "l", xlab = "ranks", ylab = "p(rank | effect)")
# legend("topright", legend = c("prob_test0", "prob_test1", "prob0", "prob1"),
# col = 1:4, lty = 1:4, lwd = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.