Introduction to linear models

Eamonn Mallon

Invalid Date

Population?, Parameter?, Sample estimate?

Collect fly eggs every week and split eggs into two vials:

Group A: standard food

Group B: diluted food

Rear them this week and measure 30 wings total (say 15 per group).

  1. In this week’s rearing, what is the difference in mean wing length between diluted and standard food?
  2. Under our protocol, does diluted food reduce wing length in general?

Answers

Week-specific parameters

\[ \mu(P_{week},standard) \quad \mu(P_{week},diluted) \]

Differences in means (parameter)

\[ \Delta_{week} = \mu(P_{week},diluted) - \mu(P_{week},standard) \]

Differences in means (sample estimates)

\[ \hat{\Delta}_{week} = \bar{x}(P_{week},diluted) - \bar{x}(P_{week},standard) \]

Protocol-level parameters

\[ \mu(P_{protocol},standard) \quad \mu(P_{protocol},diluted) \]

Differences in means (parameter)

\[ \Delta_{protocol} = \mu(P_{protocol},diluted) - \mu(P_{protocol},standard) \]

Differences in means (sample estimates)

\[ \hat{\Delta}_{week} = \bar{x}(P_{week},diluted) - \bar{x}(P_{week},standard) \]

same computed difference, but totally different inferential meaning

Same data, different question, different population

  • Population = the set you want to talk about

  • Parameter = the true value in that population

  • Statistic (sample estimate) = what you calculated from your sample

  • Inference = the bridge from sample statistic to population parameter

Response and predictor (explanatory) variables

  • Does temperature affect enzyme activity?
  • Does fertiliser concentration affect plant height?
  • Does food type affect wing length in flies?

Response and predictor (explanatory) variables

Scenario Response variable Explanatory variable Error term
Does temperature affect enzyme activity? Enzyme activity (e.g. reaction rate) Temperature Biological variation, measurement error
Does fertiliser concentration affect plant height? Plant height Fertiliser concentration Genetic variation, microenvironment, measurement error
Does food type affect wing length in flies? Wing length Food type (standard vs diluted) Developmental noise, genetic variation, measurement error

Understanding adding variables

  • You did an experiment where you measured sheeps’ bodyweight and metabolic rate. You found that as bodyweight increased so did metabolic rate (the coefficient for bodyweight is positive). Draw this graph.
  • Someone suggests you include altitude in the model. Write out this model.
  • Now the coefficient for altitude is positive but the one for bodyweight is negative. Draw this graph (make up new data if you need to)
  • What does this mean biologically?

My graph and stats

term est_m1 p_m1 est_m2 p_m2
(Intercept) 3.810 0.711 294.456 0
bodyweight 3.562 0.000 -1.096 0
altitude NA NA 0.146 0