Hi all,

I am new to statistic and have a question about calculating the power of test statistic. According to what I have founf so far I can use the webpower package in R and since I want to calculate the power of my logistic regression model, I need to use wp.regression function. Unfortunately I have no idea how I should set some of its variable.

wp.logistic(n = NULL, p0 = NULL, p1 = NULL, alpha = 0.05, power = NULL, alternative = c("two.sided", "less", "greater"), family = c("Bernoulli", "exponential", "lognormal", "normal", "Poisson", "uniform"), parameter = NULL)

The variable that I need help with them are p0 and p1. Their definitions

are as below:

p0= Prob(Y=1|X=0): the probobility of observieng 1 for the outcome variable Y when the predictor X equals 0.

p1= Prob(Y=1|X=1): the probobility of observieng 1 for the outcome variable Y when the predictor X equals 1.

The only thing that I have is p-value of my statistic test. Can I have

your thoughts to see how to calculate p0 and p1?

More Nastaran Maus Esfahani's questions See All
Similar questions and discussions