0

I would like to conduct a simulation-based power analysis for an ordinal regression with three binary, dichotomous predictors, and an ordinal dependent variable with six levels. I found a code to do so in this post: Power analysis for ordinal logistic regression, where the following code is suggested:

library(rms)
tmpfun <- function(n, beta0, beta1, beta2) {
x <- runif(n, 0, 10)
eta1 <- beta0 + beta1*x
eta2 <- eta1 + beta2
p1 <- exp(eta1)/(1+exp(eta1))
p2 <- exp(eta2)/(1+exp(eta2))
tmp <- runif(n)
y <- (tmp < p1) + (tmp < p2)
fit <- lrm(y~x)
fit$stats[5]
}
out <- replicate(1000, tmpfun(100, -1/2, 1/4, 1/4))
mean( out < 0.05 )

My problem is that I do not know how to come up with the beta values based on the information I have. From previous studies, I know that I should expect small effect sizes of cohen's d = 0.2. How do I transform this information into the beta coeffcieints that I have to include in the power analysis?

0 Answers0