0% found this document useful (0 votes)
15 views18 pages

Guide to Multiple & Logistic Regression Steps

Biostatistics
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views18 pages

Guide to Multiple & Logistic Regression Steps

Biostatistics
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Steps to perform Multiple linear regression

The steps to perform a multiple linear regression analysis is given below,


Step 1: Descriptive analysis
 Find the mean, SD for continuous independent variables. (Analyze, Descriptive
Statistics, Frequencies, Statistics (Mean, SD, Median, Quartiles, Min, Max), untick
Display frequency tables, click OK)
 Find the frequency table for categorical independent variables. (Analyze,
Descriptive Statistics, Frequencies, tick Display frequency tables, click OK)
 Do scatterplots for continuous independent variables. (Graphs, Legacy Dialogs,
Scatter/Dot (Simple Scatter), click Define, Y-axis: dependent variable, X-axis: each
independent variable, click OK)
 Find the correlation between the dependent & independent variables. (Analyze,
Correlate, Bivariate, Variables: (all the continuous variables available), Correlation
Coefficients: (tick ‘Pearson’ if normally distributed, tick ‘Spearman’ if non-normally
distributed), Test of significance: (2-sided, 1-sided either one), tick Flag significant
correlations, click OK)

Step 2: Univariate analysis


 Do univariate linear regression analysis for all the independent variables.
(Analyze, Regression, Linear, Dependent: (select dependent variable), Independent(s):
(select 1 independent variable), Method: (Enter), Statistics: (tick Estimates,
Confidence intervales, Model fit), click OK)
 Repeat the process for all the independent variables including categorical ones.
 Find the variables that are statistically significant in nature.

Step 3: Multivariate analysis


 Do multiple linear regression analysis including the significant independent
variables. (Analyze, Regression, Linear, Dependent: (select dependent variable),
Independent(s): (select significant independent variables), Method: (Enter), Statistics:
(tick Estimates, Confidence intervales, Model fit), click OK)
 Look for any insignificant variables in the model, remove them and perform the
previous step again.
 Or else, perform variable selection methods:
o Forward Linear Regression - (Analyze, Regression, Linear, Dependent: (select
dependent variable), Independent(s): (select significant independent variables),
Method: (Forward), Statistics: (tick Estimates, Confidence intervales, Model
fit), click OK)
o Backward Linear Regression - (Analyze, Regression, Linear, Dependent:
(select dependent variable), Independent(s): (select significant independent
variables), Method: (Backward), Statistics: (tick Estimates, Confidence
intervales, Model fit), click OK)
o Stepwise Linear Regression - (Analyze, Regression, Linear, Dependent:
(select dependent variable), Independent(s): (select significant independent
variables), Method: (Backward), Statistics: (tick Estimates, Confidence
intervales, Model fit), click OK)
 Choose the most appropriate model having Adjusted R-squared value close to 1
and statistically significant ANOVA p-value.

Step 4: Run Diagnostics


Independence
 Perform the multiple linear regression analysis. (Analyze, Regression, Linear,
Dependent: (select dependent variable), Independent(s): (select significant
independent variables), Method: (Enter), Statistics: (tick Estimates, Confidence
intervales, Model fit), Save: (Predicted values: click Unstandardized, Residuals: click
Unstandardized), click OK)
 Two new columns – PRE_1 & RES_1
 Plot scatterplot (Graphs, Legacy Dialogs, Scatter/Dot (Simple Scatter), click Define,
Y-axis: RES_1, X-axis: Serial number of participants, click OK)
 On the scatter plot, draw a reference line at Unstd. Residuals = 0.
 If plot shows randomly distributed points, with no specific pattern, indicates the
assumption of independence is being followed by the model.
Homoscedasticity
 Plot scatterplot (Graphs, Legacy Dialogs, Scatter/Dot (Simple Scatter), click Define,
Y-axis: RES_1, X-axis: PRE_1, click OK)
 On the scatter plot, draw a reference line at Unstd. Residuals = 0.
 If plot shows that points are evenly distributed above and below the reference line,
indicates the assumption of homoscedasticity is being followed by the model.
Normality
 Plot a Q-Q plot (Analyze, Descriptive statistics, Q-Q plots, Variables: RES_1, tick
Estimate form data, click OK)
 Take Normal Q-Q plot of RES_1.
 If plot shows that the observations lie approximately along the 45-degree line,
indicates the assumption of normality of residuals is being followed by the model.
If the diagnostics hold, then the model is said to be appropriate for the given set of data.

Steps to perform Logistic Regression


The steps used to perform logistic regression are given as follows,
Step 1: Simple Logistic Regression
 Do a binary logistic regression analysis of a binary dependent variable. (Analyze,
Regression, Binary Logistic, Dependent: select the binary dependent variable,
Covariates: select 1 independent variable, Method: Enter, click Options: click CI for
exp(B), click OK)
 One must be careful about the type of independent variable chosen.
o If independent variable is continuous, one may select that variable and click
OK.
o If independent variable is categorical, then option Categorical must be clicked.
(Categorical Covariates: select the categorical variable, Change Contrast:
Reference Category: must select the first or last (default) value, click Change,
click Continue)
 For interpretation, take the values of exp(B) indicating the OR, 95% CI and p-value.

Step 2: Multiple Logistic Regression


 Take the significant independent variables from Step 1 and perform Multiple
Logistic Regression (Analyze, Regression, Binary Logistic, Dependent: select the
binary dependent variable, Covariates: select significant independent variables,
Method: Enter, click Options: click CI for exp(B), click OK)
 One must be careful about the type of independent variable chosen.
o If independent variable is continuous, one may select that variable and click
OK.
o If independent variable is categorical, then option Categorical must be clicked.
(Categorical Covariates: select the categorical variable, Change Contrast:
Reference Category: must select the first or last (default) value, click Change,
click Continue)
 For interpretation,
o Take the values from the Omnibus Tests of Model Coefficients (to assess the
fit of the model against the null model, if significant p-value for model then
the model indicates an increase in accuracy over null model.
o Use Nagelkerke R-squared value to tell how much variation is explained by
the model.
o Hosmer-Lemeshow test indicates the model is a good fit when p-value is
greater than 0.05
o Classification table shows the correct & incorrect classifications of the
dichotomous outcome. Depicts the prediction accuracy of the model. Give in
percentage.
o Use the value of exp(B) for interpreting the OR when adjusted for all other
covariates in the model. Report 95% CI and p-values also.
o When comparing between 2 models, check for the -2 log likelihood in Model
Summary table to find the difference between these 2 values and compare it
with chi-square table value at 1 df (3.84). If the difference is less that the table
value, then the model is not adding any extra information.

Step 3: Interaction effect in Logistic regression


 Perform the step 2. When entering interaction term in the model, select the
independent variables required having interaction by using the option “>a*b>”
besides the Covariates box.
 Perform the rest of the analysis as usual.

Step 4: Run Diagnostics


 When performing Step 2, one can click the Save option to select Probabilities of
Predicted values (PRE_1), Standardized Residuals (ZRE_1), Leverage values
(LEV_1), Deviance of Residuals (DEV_1) to be saved in the data set.
 Compute a variable named stdsq (square of standardized, which is calculated as
ZRE_1*ZRE_1) and devsq (Square of deviance, which is calculated as
DEV_1*DEV_1)

The diagnostics for logistic regression analysis consists of,


 Plot “square of standardized” against “probability” (stdsq ag. PRE_1)
 Plot “square of deviance” against “probability” (devsq ag. PRE_1)
 Plot “standardized residuals” against "Leverage values” (ZRE_1 VS LEV_1)

Interpretation:
 The model summary table is used to understand how much variation in the dependent
variable can be explained by the model using the Cox & Snell R-square and
Nagelkerke R-square values. Closer the value of R-square to 1, the better is the model
fit.
 The effectiveness of the predicted classification against actual classification can be
determined using the Classification Table. It shows the accuracy of the model.
 Variables in the Equation table shows the contribution of each independent variable to
the model and its statistical significance. Use the table to report the values of Exp(B),
Sig. and 95% CI.
 For instance, the conclusion can be reported as: “The odds of a person having the
disease is “Exp(B)” times greater for the non-reference category as opposed to the
reference category.”
 Or
 For continuous data, the OR can be explained using percentage increase or decrease
by calculating (OR-1). For instance, “For continuous variable, the OR is “Exp(B)”
calculate the change in odds for one unit increase in the continuous variable.”

Steps to perform Survival Analysis


For a data containing survival time, we can perform survival analysis in the following
manner:
Step 1: KM Method with no groups
 Choose the Kaplan-Meier option to start analysis. (Analyze, Survival, Kaplan-
Meier, Time: select the time variable, Status: select the event variable, Define Event:
(denote the event number in data under Single value option, usually 1), Options:
(Statistics: tick Survival table, Mean and median survival, Plots: Survival), click OK)
Interpretation:
 Note the Case Processing Summary which shows the number of events in the data.
 The Survival table shows the survival probability for the event alone.
 Use the “Means and medians for survival time” table to report the median survival
time. In case, median is not given report the mean survival time instead.
 The Survival Function plot is a step-down curve showing the decreasing survival
probability of individuals with increasing time.

Step 2: KM Method with groups, Comparison of survival curves


 Choose the Kaplan-Meier option to start analysis. (Analyze, Survival, Kaplan-
Meier, Time: select the time variable, Status: select the event variable, Define Event:
(denote the event number in data under Single value option, usually 1), Factor: select
the grouping variable, Compare Factor: (select Log rank test statistics), Options:
(Statistics: tick Survival table, Mean and median survival, Plots: Survival), click OK)
Interpretation:
 The Case Processing summary table depicts the number of events and censored in
each group.
 The Survival table shows the survival probability for the event alone for both the
groups.
 Use the “Means and medians for survival time” table to report the median survival
time for both the groups. In case, median is not given report the mean survival time
instead.
 The Overall Comparisons table is used to show whether the 2 survival curves are
significantly different or not. If the p-value is less than 0.05, it is said that the survival
curves of both the groups are significantly different from each other and is statistically
significant in nature.
 The Survival Function plot is a step-down curve showing the decreasing survival
probability of individuals with increasing time under 2 groups

Step 3: Cox PH model


Checking for PH assumptions
 Perform KM analysis. (Analyze, Survival, Kaplan-Meier, Time: select the time
variable, Status: select the event variable, Define Event: (denote the event number in
data under Single value option, usually 1), Factor: select the grouping variable,
Compare Factor: (select Log rank test statistics), Save: (tick Survival), Options:
(Statistics: tick Survival table, Mean and median survival, Plots: Survival), click OK)
 The above procedure will save the survival probability in the dataset as “SUR_1”
 Use the SUR_1 variable to calculate the -log(log(survival)). This can be done using
Compute Variable under Transform option. (Transform, Compute Variable, Target
Variable: name of the variable, Numeric Expression: -1 * LN(-1 * LN(SUR_1)), click
OK)
 Also compute the log of time variable
 Plot a scatter plot using the log of time and log(log(survival)) variables. (Graphs,
Legacy Dialogs, Scatter/Dot (Simple Scatter), click Define, Y-axis: LN(LN(SUR_1)),
X-axis: LN(time), click OK)
Interpretation:
 From the plot if the scatterplots run parallel to each other, the PH Assumption holds.
 Move on to univariate Cox model.
 From the plot if the scatterplots crisscross each other, the PH Assumption does not
hold.

Univariate Cox Model


 Perform univariate Cox Regression (Analyze, Survival, Cox Regression, Time:
select time variable, Status: select event variable, Define Event: (denote the event
number in data under Single value option, usually 1), Covariate: select 1 independent
variable, Options: (Model Statistics: tick CI for exp(B)) , click OK)
 If Covariate is categorical then select the option Categorical: (Categorical
Covariates: the variable, Change Contrast: select the reference category)
Interpretation:
 For the categorical covariate, a HR of Exp(B) suggests that the patients in the non-
reference group are (1/Exp(B)) less likely to experience the event of interest
compared to those in the reference group.
 For continuous covariate, a HR of “Exp(B)” suggests that there is a strong positive
(negative) association between the variable and the hazard of experiencing an event of
interest.
 The model suggests the variable is highly significant is p-value < 0.05
 Report the values of Exp(B), 95% CI, Sig. for table.

Multivariate Cox Model


 Perform multivariate Cox Regression for the significant independent variables.
(Analyze, Survival, Cox Regression, Time: select time variable, Status: select event
variable, Define Event: (denote the event number in data under Single value option,
usually 1), Covariate: select significant independent variables, Options: (Model
Statistics: tick CI for exp(B)) , click OK)
 Can be interpreted in the same manner as above.
Steps to perform Poisson Regression
The steps to perform Poisson regression is as follows,
Step 1: Descriptives
 Perform descriptive statistics for all the variables.
 Check the histogram of the dependent variable and look for skewed distribution.
 Perform bivariate correlation between the dependent variable and independent
variables. (Analyze, Correlate, Bivariate, Variable: select all, Correlation Coefficients:
Pearson/Spearman, click OK)

Step 2: univariate Poisson regression


 Perform univariate analysis. (Analyze, Generalized Linear Models, Generalized
Linear Models, Type of Model: (Custom: Distribution: Poisson, Link function: Log),
Response: (Dependent Variable: select the variable), Predictors: (Factors: select
categorical variables, Covariates: select continuous independent variables), Model:
(Model: Main Effects, select the variables, if interaction select accordingly),
Estimation: no change, Statistics: (tick Print: Include exponential parameter
estimates), click OK)
 Find the significant independent variables

Step 3: multivariate Poisson regression


 Perform univariate analysis. (Analyze, Generalized Linear Models, Generalized
Linear Models, Type of Model: (Custom: Distribution: Poisson, Link function: Log),
Response: (Dependent Variable: select the variable), Predictors: (Factors: select
categorical variables, Covariates: select continuous independent variables), Model:
(Model: Main Effects, select the variables, if interaction select accordingly),
Estimation: no change, Statistics: (tick Print: Include exponential parameter
estimates), click OK)

Interpretation:
1. Look in the Goodness of Fit table, at the Value/df column for the Pearson Chi-Square
row.
 If the value is LESS THAN .05, then the model does not fit the data well and other
analyses should be considered.
 If the value is MORE THAN .05, then the model does the fit the data well and researchers
can continue with interpreting the results.

2. Look in the Omnibus Test table, under the Sig. column. This is the p-value that is
interpreted.
 If the p-value is LESS THAN .05, then researchers have statistically significant model
and should continue interpreting the results.
 If the p-value is MORE THAN .05, then researchers do not have a significant model.
Report the p-values as needed.

3. Look in the Tests of Model Effects table, under the Sig., Exp(B), Lower, and Upper
columns.
For categorical or ordinal predictors:
 The last category of the categorical or ordinal variable is going to serve as the reference
group for interpretation purposes.
 If the p-value is LESS THAN .05 and the adjusted odds ratio with its 95% CI is above
1.0, the risk of the outcome occurring increases that many more times versus the
reference category.
 If the p-value is LESS THAN .05 and the adjusted odds ratio with its 95% CI is below
1.0, then the risk of the outcome occurring decreases that many times versus the reference
category.
 If the p-value is MORE THAN .05, then the 95% CI for the adjusted odds ratio crosses
over 1.0 and the association is non-significant.

For continuous predictors:


 If the p-value is LESS THAN .05 and the adjusted odds ratio with its 95% CI is above
1.0, for every one-unit increase in the continuous variable, the risk of the outcome
occurring increases that many more times versus the reference category.
 If the p-value is LESS THAN .05 and the adjusted odds ratio with its 95% CI is below
1.0, for every one-unit increase in the continuous variable, the risk of the outcome
occurring decreases that many times versus the reference category.

Step 4: Run Diagnostics


Residuals
At this point, researchers need to construct and interpret several plots of the raw and
standardized residuals to fully assess model. Residuals can be thought of as the error
associated with predicting or estimating outcomes using predictor variables. Residual
analysis is extremely important for meeting the linearity, normality, and homogeneity of
variance assumptions of Poisson regression.

 Go back to the Data View. There are three new variables that have been created.
The first is the predicted value of the mean of response of that observation and is given
the variable name MeanPredicted.
The second variable contains your standardized Pearson residual and is given the variable
name of StdPearsonResidual.
The third variable has standardized Deviance residuals and will be given the variable
name of as StdDevianceResidual.

 Click Graphs.
 Drag the cursor over the Legacy Dialogs drop-down menu.
 Click Scatter/Dot.
 Click Simple Scatter to select it.
 Click Define.
 Click on the StdDevianceResidual variable to highlight it.
 Click on the arrow to move the variable into the Y Axis: box.
 Click on the MeanPredicted variable to highlight it.
 Click on the arrow to move the variable into the X Axis: box.
 Click OK.

Interpretation:
1. If there are not significant deviations away from 0 and 95% of the residuals are under
absolute value of 2.0, then the model is thought to fit the data.
Outliers
Normality and equal variance assumptions apply to Poisson regression analyses. Here is how
to assess outliers in the dataset:
1. Click Analyze.
2. Drag the cursor over the Descriptive Statistics drop-down menu.
3. Click Frequencies.
4. Click on the StdPearsonResidual variable to highlight it.
5. Click on the arrow to move the variable into the Variable(s): box.
6. Click OK.

The steps for interpreting the SPSS output for outliers


1. Look in the Standardized Pearson Residual table, under the first column. (It has the word
"Valid" in it).
2. Scroll through the entirety of the table.
3. If there are values that are above an absolute value of 2.0, then there are outliers.

Sample Size Calculation using ‘nMaster’


MEAN
Estimating the population mean (Absolute precision)
The mean is the sum of all observations divided by the number of observations. It gives the
average or typical value. When describing a set of observations of a continuous variable the
mean is calculated. A continuous variable is one that, in principle, can take any value within a
range of values. The mean is a widely used measure of central tendency because it ties in well
with the most common types of statistical analysis.

If continuous outcome variables are plausibly sampled from a normal distribution, then the
best summary statistics of the data is the mean.

The size of the survey or study will naturally depend on the subject matter and the aims of the
exercise, the desired precision etc. For each respondent (Study subject) some numerical
measurements may be recorded, for example, weight, age, height, blood pressure, body
temperature etc. In this case the data are summarized by means (average) and variance or
their derivatives. Determination of sample size has to take into account the way the outcome
will be measured. In this case, it is continuous.

When deciding on the size of the sample to use it should be realized that absolute sample size
is more important than sample size relative to the whole population, in reducing sample
variances when one is not dealing with very small populations. It is therefore very often
better not to aim at, for example, increasing the sample from 5% of the population to say 10%
but rather think in terms of absolute increments.

Assumptions:
 Outcome variable is continuous
 Sampling distribution of the sample mean is approximately normal
 Observations are independent

Formula:
2 2
Z α σ
1−
2
n= 2
d
Where:
σ : SD
d: Precision
α
1− : Desired Confidence level
2

Example:
What is the required sample size needed to achieve 5 mg/l plasma lamotrigine (LTG) among
patients who have seizures with 1.0 mg/l precision and 95% confidence. Based on a pilot
study, the standard deviation of plasma lamotrigine was 2 mg/l.

Hypothesis testing – One population mean


This method is used in situations when the aim is to compare the mean of a single group of
observations with a specific value.

This situation is not very common in practice but on occasion it may be desirable to compare
a mean value from a sample with some hypothesized value, perhaps from external standards.
The following example explains the need for hypothesis testing in one population mean. A
study was conducted to measure the haemoglobin concentrations of 15 UK adult males
admitted into an intensive care unit (ICU). The population’s mean haemoglobin concentration
in UK males is 15.0 g/dl. Is there any evidence that critical illness is associated with an acute
anaemia?

The mean haemoglobin concentration of these men is 9.7 g/dl, which is lower than the
population mean. However, in practice any sample of 15 men would be unlikely to have a
mean haemoglobin of exactly 15.0 g/dl, so the question is whether this difference is likely to
be a chance finding, due to random variation, or whether it is the result of some systematic
difference between the men in the sample and those in the general population. The best way
to determine which explanation is most likely is to calculate a confidence interval for the
mean and to perform a hypothesis test.

Assumptions:
 Outcome variable is continuous
 Sampling distribution of the sample mean is approximately normal.
 Observations are independent

Formula:

[ ]
2
σ2 Z α + Z 1−β
1−
2
n= 2
[ x−μ ]
Where:
σ : SD
x : Sample mean
μ: Population mean
x−μ
δ= : Effect size
σ

Example:
The average birth weight of newborn babies in a hospital was found to be 2.73 kg. How large
a sample is needed to test if the WHO standard birth weight of 3 kg is different from the
sample birth weight of 2.73 kg, at the 5% level of significance with a power of 90%? The
standard deviation was found to be 1.2 kg.

Paired t-test
In some clinical trial, paired outcome data may add power to detecting differences because
individual variation is reduced. Trial participants may be assessed at baseline and the end of
follow-up. Another type of pairing occurs in diseases that affect two organs such as lungs,
kidneys, and eyes are randomized to receive control therapy. Both the analysis and the sample
size estimation need to take account of this special kind of stratification. For continuous
outcomes, a mean difference in outcome between a treated and untreated eye would measure
the treatment effect and could compared using a paired t-test.

The means for correlated samples is especially useful in research involving subjects precisely
because it is so very effective in removing the extraneous effects of pre-existing individual
differences. This is not to suggest that individual differences are "extraneous" in every
context. In some cases, they might be the very essence of the phenomena that are of interest.
But there are also situations where the facts that are of interest are merely obscured by the
variability of individual differences.

The size of the survey or study will naturally depend on the subject matter and the aims of the
exercise, the desired precision etc. For each respondent (Study subject) some numerical
measurements may be recorded, for example, weight, blood pressure, body temperature etc.
In this case the data are summarized by means (average) and variance or their derivatives.
Determination of sample size has to take into account the category into which the outcome
falls.

Assumption
 The outcome variable is continuous.
 The sampling distribution of the sample observation is approximately normal.
 The observations are paired.

Formula:

( ) +Z
2 2
Z α + Z 1−β α
1− 1−
2 2
N pairs =
∆2 2

( μ2−μ1 )
∆=
σ

σ 1 +σ 2
σ=
2
Where:
μ1 and μ2: Pre-test mean & Post-test mean
σ 1∧σ 2: Pre-test SD and Post-test SD
∆ : Effect size

Example:
An investigator compares the change in blood pressure before and after the administration of
a drug. If the investigator is looking for the difference between the pre (Mean BP=95) and
post (Mean BP=85), and with the between subject Standard Deviation as 10, for a 5 % error
(two sided) and 90% power. How many patients should he recruit?

Estimating the difference between two means


This procedure is useful in the calculation of the sample size when the research objective is to
estimate clinically meaningful difference between means of any two independent groups. For
example, A study to estimate the clinically meaningful difference between mean haemoglobin
levels of males and females.

The mean is the sum of all observations divided by the number of observations. It gives the
average or typical value. When describing a set of observations of a continuous variable the
mean is calculated. A continuous variable is one that, in principle, can take any value within
a range of values. The mean is a widely used measure of central tendency because it ties in
well with the most common types of statistical analysis.

If continuous outcome variables are plausibly sampled from a normal distribution, then the
best summary statistics of the data is the mean.

The size of the survey or study will naturally depend on the subject matter and the aims of the
exercise, the desired precision etc. For each respondent (Study subject) some numerical
measurements may be recorded, for example, weight, age, height, blood pressure, body
temperature etc. In this case the data are summarized by means (average) and variance or
their derivatives. Determination of sample size has to take into account the way the outcome
will be measured. In this case, it is continuous.

Assumptions:
 The outcome variable is continuous.
 The sampling distribution of the sample mean is approximately normal.
 The observations are independent
 The variances in the two groups are similar

Formula:
Z2
1−
α [ 2 S 2p ]
2
n= 2
d
Where:
2 2
2 s1 + s2
S p= : Pooled SD
2
2 2
s1∧s 2: SD in 1st and 2nd groups
d: Precision

Example:
A study was intended to assess the difference in caloric intake at lunch between two schools,
where one school received hot lunch program while the other did not. From other nutrition
studies, they estimated that the standard deviation in caloric intake among elementary school
children was 70 calories, and they wished to make their estimate to be within 15 calories of
the true difference with 95% confidence. What is the required number of children to be
studied for the above program?

Hypothesis testing of two means


The t-test is used for comparing two means. The unpaired t-test compares the means of two
independent samples. The paired t test compares two paired observations on the same
individual or on matched individuals.

Many studies involve a comparison of two groups, treatment versus control, or treatment A
versus treatment B. Let’s consider a typical randomized trial, say of antihypertensive drug.
We locate 50 patients suffering from hypertension, randomize them into two groups, institute
a course of drug or placebo, and then measure the diastolic blood pressure. We can then
calculate mean and standard deviation for each group.

Typical randomized trial


Treatment group Control group
Sample size 25 25
Mean 98 mm Hg 102 mm Hg
SD 6 mm Hg 8 mm Hg

The statistical question is, “what is the probability that the difference of 4 mm Hg between
treatment and control group could have arisen by chance?” If this probability is small enough
then we will assume that the difference is not due to chance, and there is a significant effect
of the drug on blood pressure.

To approach this question, we start off with a null hypothesis that the population values of the
two groups are not different. Then we try to show they are different. If we were to proceed as
before, we would calculate the ratio of the difference between the two means, 4 mm Hg, to
some estimate of the error of this difference. This test statistic is called “Student’s t”. It was
developed by the statistician William Gossett who was employed as a quality control
supervisor at the Guinness Brewery in Dublin, and who wrote under the pseudonym of
Student, presumably because no one who knew his occupation would take him seriously.

Assumption:
 The outcome variable is continuous.
 The sampling distribution of the sample mean is approximately normal.
 The observations are independent.
 The variances in the two groups are similar

Formula:
[ ]
2
2 s2p Z α +Z 1− β
1−
2
n= 2
μ d

Where:
2 2
2 s1 + s2
S p= : Pooled SD
2
2 2
s1∧s 2: SD in 1st and 2nd groups
2
μd : Mean difference between the samples

Example:
A randomized trial was conducted by the nutrition department to see whether a dietary
supplement given to pregnant women will reduce the systolic blood pressure (SBP) level
during the time of delivery. One group received the new supplement whereas the other group
received the normal diet. From a pilot study, the standard deviation of SBP was 40 mm/hg
and it is expected to be the same for both the groups. What is the required sample size if we
expect a difference of 20 mm/hg SBP at 5% level of significance with 90% power?

PROPORTION
Estimating single proportion (Absolute precision)
A proportion is made up from a binary variable, where for each individual in the sample the
value is one of two alternatives which we can label A and B. For example, a patient survives
(A) or dies (B), a specimen is positive (A) or negative (B). The proportion (p) of survival is
the number of alive cases divided by the total number in the sample.
r(A)
p ( A )=
n
The simplest case to consider is when we have a single group of individual and have
observed that a certain proportion have a particular characteristic. What can we say about the
proportion with that characteristic in the population?

Suppose a general practitioner chooses a random sample of 215 women from the patient
register for her general practice and finds that 39 of them have a history of suffering from
asthma. Let r denote the number of cases with the characteristic out of a sample size of n, and
p as the proportion of cases, so p=r/n=0.18 in this example.

Experiments with just two possible outcomes occur quite often. For instance, a medical
doctor is interested whether his patient will live through the operation - an experiment with
two outcomes. A student commuting to school is interested whether she gets stuck in a traffic
jam - another yes-or-no experiment. A social scientist may be interested if people stuck on a
remote island feel happy. If she confines her research to happy-unhappy without further
classifications of the "degrees of happiness", this is another experiment involving two
outcomes.

Proportions and Percents


Proportions are fractions. For instance, if three out of ten boys are left-handed, then the
proportion of left-handed boys is 3/10=0.3. Percents are another way of expressing fractions
with denominator 100 (from Latin cent for a 100). Since all decimal numbers can be written
as fractions, this procedure is often extended to expressing all decimal numbers. Thus, a
number 0.123 which is 123/1000 would be expressed as 12.3%.

Population / Expected proportion


To be more specific, P is the probability that a single yes-or-no experiment yields yes as an
outcome. Or, in another formulation, p is the probability that a single object selected from a
(large) population exhibits the feature under study. Like all probabilities, p is a number
between 0 and 1(inclusive).

Assumptions:
 The outcome variable measure should be binary (success/failure, alive/dead)
 p is probability of success in each trial; (1-p) is probability of failure
 The sampling distribution of the sample proportion (p) is approximated to normal.

Formula:
2
Z α p(1− p)
1−
2
n=
d2
Where:
p: Expected proportion
d: Absolute precision

Example:
The prevalence of anaemia among pregnant women is 60%. Let us assume the precision to
be 5%. How many subjects are needed to be studied taking 95% confidence interval?

Hypothesis testing of single proportion


Population proportion
To be more specific, P is the probability that a single yes-or-no experiment yields yes as an
outcome. Or, in another formulation, p is the probability that a single object selected from a
(large) population exhibits the feature under study. Like all probabilities, p is a number
between 0 and 1(inclusive). Probability p, any population proportion, does not depend on the
experiment, or the results of the experiment, at all. It has some predetermined value that stays
constant forever or at least for prolonged periods of time.

Sample proportion
Sample proportions are computed by counting the number of objects that exhibits the feature
under study in your sample and dividing it by the sample size. Or by counting the number of
yes-answers and dividing it by the number of yes-or-no questions asked. It is a fraction with
value between 0 and 1. The denominator in a fraction representing a sample proportion is
always the sample size n.
Assumptions:
 The outcome variable measure should be binary (success/failure, alive/dead)
 The sampling distribution of the sample proportion is approximated to normal.

Formula:
H 0 : P=P0 , H a :P ≠ P0

{ √ P ( 1−P )+ Z √ P ( 1−P ) }
2
Z α 0 0 1− β a a
1−
2
n= 2
( P a−P0 )
Where:
P0 and Pa : Population and sample proportions

Example:
The success rate for appendicitis was reported as 0.7 in the literature. A new medical surgery
has been proposed which is alleged to offer equivalent success. A hospital without the
necessary surgical facilities or staff has decided to use the newly alleged surgery on all new
patients presenting with this condition. How many patients must be studied to test Ho: P =
0.7 at the 0.05 level it is desired to have 90% power of difference in proportion of success of
10% points or greater?

Estimating the difference between two proportions


The magnitude of the difference between two population proportions is often of interest. We
may want to compare, for example, men and women, two age groups, two socio economic
groups, or two diagnostic groups with respect to the proportion possessing some
characteristic of interest.
Suppose that a sample has been taken from a population and it is of interest to compare BP
(low/high) in current, ex-and non-cigarette-smokers. Each of these three groups can be
considered to be a sample from one of the three populations defined by current, ex-and non-
smoking. This is a common situation in medical research, where the comparison groups are
defined by the value of some qualitative variable (such as smoking) in a single study group.
Sometimes, however, the sampling from population groups is more explicit. Separate samples
may, for instance, be taken of school children from rural and urban areas to compare IQs. The
samples may be of equal size or may reflect the distribution of urban and rural children in the
country as a whole. Both of these examples have one important factor in common; the
samples are independent samples from the populations being studied. By independent it is
meant, in simple terms, that the actual selection of individuals for one sample group is not
affected by the individuals already selected for one of the other groups. It is vital to
understand this notion of independence if the correct statistical test is to be chosen, and
before undertaking any statistical analysis a researcher must too sure whether or not the
comparison groups are independent.

Assumptions:
 The outcome variable measure should be binary (success/failure, alive/dead)
 The sampling distribution of the sample proportion is approximated to normal.

Formula:
The difference between two proportions represents a new parameter, P1−P2.
In the epidemiologic literature, this difference is called risk difference and gives the absolute
difference in risk between 2 groups.

Z
2
1−
α [ P1 ( 1−P1 ) + P2 ( 1−P2 ) ]
2
n=
d2
Where:
P1 and P2: Proportions in the 1st and 2nd groups
2
d : Population risk difference

Example:
In a pilot study using 50 patients in each of two groups (intervention and placebo) it was
observed that the cure rates were P1=0.40 and P2=0.32 respectively. The estimated risk
difference is P1−P2=0.08. If we would like to estimate the population risk difference to be
within 5% points of the true value (precision) with 95% confidence, how many additional
patients must be studied?

Hypothesis testing of two large proportions-Equal Allocation


The magnitude of the difference between two population proportions is often of interest. We
may want to compare, for example, men and women, two age groups, two socio economic
groups, or two diagnostic groups with respect to the proportion possessing some
characteristic of interest.

Suppose that a sample has been taken from a population and it is of interest to compare BP
(low/high) in current, ex-and non-cigarette-smokers. Each of these three groups can be
considered to be a sample from one of the three populations defined by current, ex-and non-
smoking. This is a common situation in medical research, where the comparison groups are
defined by the value of some qualitative variable (such as smoking) in a single study group.
Sometimes, however, the sampling from population groups is more explicit. Separate samples
may, for instance, be taken of school children from rural and urban areas to compare IQs. The
samples may be of equal size or may reflect the distribution of urban and rural children in the
country as a whole. Both of these examples have one important factor in common; the
samples are independent samples from the populations being studied. By independent it is
meant, in simple terms, that the actual selection of individuals for one sample group is not
affected by the individuals already selected for one of the other groups. It is vital to
understand this notion of independence if the correct statistical test is to be chosen, and
before undertaking any statistical analysis a researcher must to sure whether or not the
comparison groups are independent.

Assumptions
 The outcome variable measure should be binary (success/failure, alive/dead)
 The sampling distribution of the sample proportion is approximated to normal.
Note: In the absence of Population Difference, we could consider sample proportion
difference. The population difference may not be available many times, though it is ideal to
have that estimate.

Formula:
H 0 : P1=P2 , H a : P1 ≠ P2

{ }
2
Z
1−
α √2 P ( 1−P ) + Z1− β √ P1 ( 1−P1 ) + P 2 ( 1−P 2)
2
n= 2
( P1−P2 )
Where:
P1 + P2
P=
2
P1∧P2: Proportions in the 1st and 2nd groups

Example:
An epidemiologist compared, in a pilot study, a sample of 100 adult subjects suffering from a
certain neurologic disease to a sample of 100 comparable control subjects who were free of
the disease, 50 of the subjects with the disease (50%) and 25 of the controls (25%) were
involved in industries using a specific chemical. Assuming that the proportion employed in
these industries in the entire population is similar to that observed in the pilot study, how
many additional subjects should be studied in each of the two groups to have 80% confidence
of detecting the true difference between the groups if the hypothesis is tested at the 5% level?

Hypothesis testing for two Large Proportions (Unequal allocation)


The magnitude of the difference between two population proportions is often of interest. We
may want to compare, for example, men and women, two age groups, two socio economic
groups, or two diagnostic groups with respect to the proportion possessing some
characteristic of interest.

Suppose that a sample has been taken from a population and it is of interest to compare BP
(low/high) in current, ex-and non-cigarette-smokers. Each of these three groups can be
considered to be a sample from one of the three populations defined by current, ex-and non-
smoking. This is a common situation in medical research, where the comparison groups are
defined by the value of some qualitative variable (such as smoking) in a single study group.
Sometimes, however, the sampling from population groups is more explicit. Separate samples
may, for instance, be taken of school children from rural and urban areas to compare IQs. The
samples may be of equal size or may reflect the distribution of urban and rural children in the
country as a whole. Both of these examples have one important factor in common; the
samples are independent samples from the populations being studied. By independent it is
meant, in simple terms, that the actual selection of individuals for one sample group is not
affected by the individuals already selected for one of the other groups. It is vital to
understand this notion of independence if the correct statistical test is to be chosen, and
before undertaking any statistical analysis a researcher must to sure whether or not the
comparison groups are independent.
Assumptions:
 The outcome variable measure should be binary (success/failure, alive/dead)
 The sampling distribution of the sample proportion is approximated to normal

Formula:
2

n =m =
'{ Z α √( r +1 ) P Q+Z β √ r P1 Q1+ P 2 Q2 } '
, n2=m × r
1 2

N=n1+ n2
P1 + R P 2
δ=P2−P1 ; P= ,Q=1−P
r +1

Where:
P1∧P2: Proportions in the 1st and 2nd groups
δ : Difference in the 2 proportions
r: Allocation ratio

Example:
An epidemiologist compared, in a pilot study, a sample of 100 adult subjects suffering from a
certain neurologic disease to a sample of 100 comparable control subjects who were free of
the disease, 50 of the subjects with the disease (50%) and 25 of the controls (25%) were
involved in industries where a specific chemical was used. Assuming that the proportion
employed in these industries in the entire population is similar to that observed in the pilot
study, how many subjects are required in each of the two groups, if it desired to allocate the
diseased and the controls in the ratio of 3:2 with 80% power and at 5% level of significance?

You might also like