Model with linear term

The most general model for the effect of a factor is

yij  =  µ   +   βi   +   εij       for i = 1 to g and j = 1 to ni

where yij is the j'th of the ni replicates getting factor level i and εij is the normally distributed (0, σ) term representing unexplained variation within factor levels.

A simple model that ensures smoothness in how a numerical factor affects the response replaces the term βi with a linear term in the numerical value for the factor, xi.

yij  =  µ   +   β xi   +   εij       for i = 1 to g and j = 1 to ni

This constrains the mean response to change linearly with xi.

Model allowing some curvature

A more flexible model that still specified smoothness in the relationship but also allows some curvature adds a quadratic term,

yij  =  µ   +   β xi   +  γ xi2  +   εij       for i = 1 to g and j = 1 to ni

It is important to look at a scatterplot of the data to investigate whether the relationship seems reasonably linear or quadratic before fitting these models.

Least squares

As with all other models that we have previously considered, the parameters of the linear and quadratic models can be estimated to minimise the sum of squares of the model residuals — i.e. by least squares.

Antibiotic effectiveness

An experiment was conducted to assess how well an antibiotic, polymyxin B, killed the bacterium, Brucella bronchiseptica. Petri dishes containing the bacterium (grown in agar) were used and different doses of the antibiotic were added. The diameter of the area cleared around the addition point were recorded. Each of 6 different doses of antibiotic was used 10 times.

(Note that the crosses have been jittered a little (randomly moved) to separate them in the scatterplot.)

The pop-up menu can display the four different types of model on the diagram — the simplest model where the antibiotic does not affect the response, the linear and quadratic models and the most general model that does not impose any smoothness in the response means at the different factor levels.

Investigate all four models in turn. For each model, red arrows can be dragged to adjust the fit of the model.

The number of arrows that can be dragged for each model equals the number of unknown parameters.

After dragging the arrows to improve the fit, click Least squares to see the model with the minimum residual sum of squares.