Read me
#########
Data and code accompanying June 2022 submission of MS entitled 'Evidence of maternal and paternal age effects on speed in thoroughbred racehorses' to Royal Society open Science.

Paper authors are P. Sharman, A. Young, A. Wilson.

The work described in the paper formed part of P. Sharmans 2021 PhD thesis at the University of Exeter (UK).

Dryad archive contains 

-an anonymised data set in plain text of race performance records on individual thoroughbred horses, together with all covariates used in analyses presented in the thesis/MS. Each line of data 
represents a single race performance by a single horse. Column headers are

horse_ID - a unique identifier for the individual horse recorded
year - year in which the racing performance was recorded  	
year - a duplicate of previous column	
no_runners -number of horses running in that race	
racecourse - a unique identifier for the racecourse on which that race was run	
horse_age - the age (in years) of the horse at the time of that race performance 	
sex - sex of the horse recorded as f (filly; female) or c (colt; male)  	
racedistance_yards_rf	 - the distance of the race in yards
speed - the average speed of the horse over the race (calculated as time/distance in yards per second)  
going - a standardised measure of how soft the ground was for that race	
timing	- the method of race timeing used (electronic e, or hand h)
sire_ID	- a unique identifier for the sire of the horse 
sire_age_from_mean - defined as (sire_age_at_covering - sire_mean_age); see below for both terms	
sire_mean_age - mean sire_age_at_covering across all offspring records in the database from that sire (years)	
Dam_ID	-a unique identifier for the sire of the horse 
dam_age_from_mean -defined as (dam_age_at_covering - dam_mean_age); see below for both terms	
dam_mean_age - mean dam_age_at_covering across all offspring records in the database from that dam (years)	
primiparity - whether the horse was a primaparous offspring (i.e. first born offspring of its dam)	
sire_age_at_covering - sire's age (years) when the offspring horse was conceived 	
dam_age_at_covering - - dam's age (years) when the offspring horse was conceived


-ASReml code used to fit models presented in the thesis/MS. These files have extension (.as) recognised as a command file by asreml but are plain text and can be read with any text editor. 
There are 4 files with numbers 1-4 corresponding to model numbers presented in the paper. Each file codes for a linear mixed effect model of horse speed as the dependent variable and a common 
set of fixed and random effects. The four models (and files) however differ in the way that fixed effects are fitted to account for parental age effects on speed. Specifically;

Model 1 - fits both sire_age_covering and dam_age_covering as multi-level factors
Model 2 - fits both sire_age_covering and dam_age_covering as linear covariates
Model 3 - uses a 'within-individual centring' reparameterision in which sire_age_from_mean and sire_mean_age are fitted in place of sire_age_covering. Dam age terms are treated analogously
Model 4 - uses an additional reparameterision to directly test for selective disapearance in which sire_age_covering and sire_mean_age are fitted together. Dam age terms are treated analogously 