UNISTAT - the ultimate Excel statistics add-in

7.4.4. Regression with Replicates

This is a test of linearity for bivariate regressions when the data contains multiple measurements of the dependent variable for each value of the independent variable. The null hypothesis tested is “population regression is linear” against the alternative hypothesis “population regression is not linear”.

Regression with Replicates

Select at least one variable as [Factor] and at least one data variable as [Dependent]. The procedure is run separately for each [Factor] / [Dependent] pair. Output consists of simple regression results, and ANOVA of regression table (testing the null hypothesis that “the slope of the regression line is zero”), another ANOVA table where the among groups variation is broken down into the Linear Regression and its error sum of squares. The test statistic is the F-test for regression error term, which is defined as:

   Regression with Replicates

Example 1

Examples 17.8a and 17.8b on pp. 349, 350 from Zar, J. H. (2010). The null hypothesis that “the population regression is linear” is tested at a 95% confidence level.

The table format given in the book can be transformed into the factor format by using UNISTAT’s DataStack Columns procedure and the Level() function (see 3.4.2.5. Statistical Functions). All data on systolic blood pressure should be stacked in a column Pressure (the Y variable) and all data on ages (the X variable) should be expanded to form a column Age to keep track of the age groups of pressure measurements.

Open ANOTESTS, select Statistics 1Tests for ANOVARegression with Replicates and select Age (C5) as [Factor] and Pressure (C6) as [Dependent] to obtain the following results:

Regression with Replicates

Regression results

Constant =

 68.7849

Slope =

 1.3031

R-squared =

 0.9827

Standard Error =

 2.5702

 

ANOVA of regression

Due To

Sum of Squares

DoF

Mean Square

F-stat

Prob

Regression

 6750.289

 1

 6750.289

 1021.819

 0.0000

Error

 118.911

 18

 6.606

 

 

Total

 6869.200

 19

 361.537

 

 

 

Test of linearity

Due To

Sum of Squares

DoF

Mean Square

F-stat

Prob

Among groups

 6751.933

 4

 1687.983

 215.916

 0.0000

Regression

 6750.289

 1

 6750.289

 863.454

 0.0000

Error

 1.644

 3

 0.548

0.070

0.9750

Within groups

 117.267

 15

 7.818

 

 

Total

 6869.200

 19

 361.537

 

 

 

Since the probability value for Regression in the ANOVA of regression table is less than 5% reject the null hypothesis that “the regression slope is zero”. The test of linearity is the F-statistic on regression error, which is 0.070 with a 97.5% probability, therefore do not reject the null hypothesis of linearity.

Example 2

Example 9.2 on p. 287 in Armitage, P. & G. Berry (1994). Data on radiographic assessments of bone healing for three doses of vitamin D are given.

The format of Table 9.3 in the book is not suitable for analysis in UNISTAT. All data should be stacked in a single column Radiography and a factor column Dose created to keep track of the group memberships.

Open ANOTESTS, select Statistics 1Tests for ANOVARegression with Replicates and select Dose (C7) as [Factor] and Radiography (C8) as [Dependent] to obtain the following results:

Regression with Replicates

For Radiography, classified by Dose

 

Constant =

 1.2195

Slope =

 0.7876

R-squared =

 0.2399

Standard Error =

 1.2408

 

ANOVA of regression

Due To

Sum of Squares

DoF

Mean Square

F-stat

Prob

Regression

 14.089

 1

 14.089

 9.151

 0.0052

Error

 44.645

 29

 1.539

 

 

Total

 58.734

 30

 1.958

 

 

 

Test of linearity

Due To

Sum of Squares

DoF

Mean Square

F-stat

Prob

Among groups

 16.992

 2

 8.496

 5.699

 0.0084

Regression

 14.089

 1

 14.089

 9.451

 0.0047

Error

 2.903

 1

 2.903

 1.948

 0.1738

Within groups

 41.742

 28

 1.491

 

 

Total

 58.734

 30

 1.958

 

 

 

The test of linearity is the F-statistic on regression error, which is 1.948 with a 17% tail probability. Therefore, do not reject the null hypothesis of linearity.