咨询G*Power双侧逻辑回归功效分析的参数设置方法
Hey there, let's walk through exactly how to map your logistic regression power analysis parameters into G*Power—no confusion, promise! First, let's clarify a small logical tweak to your hypotheses, then dive into the input rules.
Your null hypothesis is "hypertension doesn't affect headache occurrence"—this means the probability of headache is identical in both hypertensive and non-hypertensive groups (both = 0.004 under H₀). Your alternative hypothesis is that hypertensive individuals have a higher headache probability (0.332), while non-hypertensive individuals stay at the baseline 0.004. This framing aligns with how G*Power expects two-group logistic regression inputs.
First, set up G*Power correctly:
- Select Test family: z tests
- Select Statistical test: Logistic regression (two groups)
- Set Tail(s): Two-sided
Now map your values to the input fields:
- Probability in group 1 (p₁):This is the baseline headache probability for your non-hypertensive group (control). Fill in
0.004—this stays consistent across both null and alternative hypotheses, since you're only testing if hypertension shifts the probability. - Probability in group 2 (p₂):This is the headache probability for your hypertensive group (exposed). For the alternative hypothesis (the scenario you want to detect power for), fill in
0.332. For the null hypothesis, this would equal0.004(since H₀ assumes no difference), but you'll use the 0.332 value for power calculations. - X parameter pi (π):This is the proportion of non-hypertensive individuals in your total study sample (i.e., the control group's share of your overall medical population). You'll need to input the expected real-world ratio here based on your study context. For example:
- If 70% of your medical population is non-hypertensive, fill in
0.7 - If 25% are hypertensive (so 75% non-hypertensive), fill in
0.75
This parameter weights the two groups to reflect your actual study's sample distribution, which directly impacts the effect size calculation.
- If 70% of your medical population is non-hypertensive, fill in
Once you input p₁, p₂, and π, G*Power will automatically compute the effect size (as an odds ratio OR and Cohen's f²). You don't need to calculate this manually—just double-check that your p₁/p₂ assignments match control/exposed groups correctly.
If you're calculating the sample size needed to detect the difference between 0.004 (non-hypertensive) and 0.332 (hypertensive), your core inputs would be:
- p₁ =
0.004 - p₂ =
0.332 - π = [your expected non-hypertensive proportion]
- Set your desired power (e.g., 0.8) and alpha (0.05), then G*Power will output the required total sample size.
内容的提问来源于stack exchange,提问作者Anthony Nash




