Sample Size Calculator: Linear Regression Comparing Two slopes
Hypothesis: Two-Sided Equality
Data Input: (Help) (Example)
Input
Results
α
Ncases
£]
Ncontrol
£mx1
Ntotal
£mx2
£mp
£f1
£f2
r
Variables
Descriptions
£\
Probability of type I error
Probability of type II error
The standard deviation of unexposed group
The standard deviation of exposed group
Slope of the first linear regression line
Slope of the second linear regression line
Standard deviation from pooled variance
Ratio of unexposed to exposed
Help Aids Top
Application: This section illistrates how to determine the minimum sample size for linear regression comparing two slopes.
Procedure:
a) Value of £\, the two-sided confidence level
b) Value of £], the type II error (1-power)
c) Standard deviations for unexposed group and exposed group
d) Standard deviations from pooled variance
e) Slope of the first linear regression line
f) Slope of the second linear regression line
g) Ratio of unexposed to exposed
a) The required sample size.
Formulae:
Top
Example
From the Armitage and Berry's cadmium exposure study, 28 cadmium industry workers with less than 10 years of cadmium exposure and 44 workers never exposed to cadmium. The standard deviations of the ages of those unexposed and exposed were 12.0 and 9.19 respectively. Regressing vital capacity on age in the two groups yielded slope of -0.0306 and 0.0465 liters per year of life in unexposed and exposed workers. The standard errors for the slopes are 0.00754 and 0.0113; the residual mean squares from the unexposed and exposed regressions are 0.352 and 0.293. The pooled estimate of the error variance from both groups is s2=0.329. Suppose we want to recruit sufficient workers to detect a true difference of -0.0159 in the two groups with 80%, type I error of 0.05, and ratio of unexposed to exposed workers m=44/28=1.57.
z£\/2=1.960
z1-£]=0.842
£mx1=12
£mx2=9.19
£mp=0.574
£f1=-0.0306
£f2=-0.0465
r=44/28=1.57
Nexposed = 167
Nunexposed = 263
Therefore, 430 cadmium worker is required.