set.seed(10)
# no effect
x <- rnorm(1e3)
riskRegression:::findP1(x, alternative = "two.sided")
riskRegression:::findP1(x, alternative = "greater")
riskRegression:::findP1(x, alternative = "less")
# effect
x <- rnorm(1e3, mean = 1)
riskRegression:::findP1(x, alternative = "two.sided")
riskRegression:::findP1(x, alternative = "greater") # pnorm(q = 0, mean = 1)
riskRegression:::findP1(x, alternative = "less")
x <- rnorm(1e3, mean = -1)
riskRegression:::findP1(x, alternative = "two.sided")
riskRegression:::findP1(x, alternative = "greater")
riskRegression:::findP1(x, alternative = "less") # pnorm(q = 0, mean = -1)
Run the code above in your browser using DataLab