[1] "C:/Users/marti/OneDrive/Documents/Berkshire/Prog"
Berkshire 2023 progeny testing
Data formatting, checking
Start reading historical data and current placement data
Read quality data and print samples without IMF and other MQ
Meat quality data includes many spreadsheets that are imported and compiled into one single table. I took care to link all records by the ID (last 4 digitst of RFID)
Import Weight data
Weight and performance data are part of the placement file, but in a different spreadsheet. They are read, filtered for rows with missing data and prepared for fusion with other data. Again, using ID as a key for linking records.
Join placement, weight and meat quality
THis is by far the longest data wranging operation including three tables: Placement, weight and MQ. Several steps take place here:
select variables in each table
rename variables as needed
compute ADG for the whole test period (april-august weights)
Transform Share force to starprobe units using equation from ISU paper (Figure 4): Instron_kg=WBSF_KG*0.8143+3.4416, please see ABA reports Cybox folder.
Compute LEA from provided data
Note: How LEA was computed: Take 2 columns from LEA spreadsheet (Dots and Initial), LEA=Dots/20+Initial. It has been confirmed by PU
Finally, raw data is saved.
Pigs per SIRE
There are at least 7 pigs per Sire. Any other eligibility criteria?
# A tibble: 6 × 2
Sire cnt
<fct> <dbl>
1 A3C9 Count 12-2 7
2 DHST 2 Smoked 4-2 8
3 OHK1 Midnight Special 4-6 8
4 TSS1 L12 Tex 20-7 7
5 TSS1 Lancelot 26-3 8
6 TSS2 Hollywood 3-5 7
Compare this year’s results to data up to 2022
This is important to make sure we are working in the same range for all phenotypes and that we can join data for computing correction factors.
The following phenotypes are compared between the two datasets:
[1] "Year" "ID" "Pen" "Breeder"
[5] "Sire" "Gender" "On_Test_Date" "On_Test_WT"
[9] "Off_Test_Date" "Off_Test_Weight" "On-Test_Days" "On-Test_ADG"
[13] "Soundness_Score" "Market_Date" "Market_Weight" "Carcass_BF10"
[17] "Carcass_LEA" "48h_Loin_pH" "Visual_Color" "Visual_Marbling"
[21] "Visual_Firmness" "Minolta_Y" "Minolta_L*" "Hunter_L"
[25] "Thaw_Purge" "Cook_Loss" "Juiciness_Score" "Tenderness_Score"
[29] "Instron_kg" "Percent_IMF"
The comparison is on the basis of the mean value per year and sex of the pigs in the progeny test. It is EXTREMELY important that ABA reviews these results and flag anything that may not make sense. We are on time to make adjustments as long as sire evaluations are not published.
Compare means
This table shows the mean value (average) for Barrows (B) and Gilts (G) in the current test (2023) and in previous tests.
Again: extremely important to check this.
Observations of some results:
Purge larger
Instron starprobe larger
I can provide a full comparison in case it is useful for a discussion.
Full comparison between years
Not showing this anymore, but it is available
# A tibble: 46 × 6
# Groups: Phenotype [23]
Phenotype yr mean sd Q1 Q3
<chr> <chr> <dbl> <dbl> <dbl> <dbl>
1 48h_Loin_pH 2023 5.58 0.120 5.52 5.6
2 48h_Loin_pH previous 5.77 0.158 5.67 5.85
3 Carcass_BF10 2023 1.15 0.264 1 1.3
4 Carcass_BF10 previous 1.08 0.304 0.85 1.2
5 Carcass_LEA 2023 6.74 0.985 6.25 7.2
6 Carcass_LEA previous 6.99 1.19 6.15 7.75
7 Cook_Loss 2023 21.1 3.49 18.9 22.9
8 Cook_Loss previous 19.7 4.08 17.1 22.5
9 Hunter_L 2023 40.2 3.36 38.3 43.1
10 Hunter_L previous 39.8 3.81 37.2 42.3
# ℹ 36 more rows
Full comparison between years and sexes
This table is very long, I am ommiting it now, but it is available upon request
# A tibble: 92 × 7
# Groups: Phenotype, yr [46]
Phenotype yr Gender mean sd Q1 Q3
<chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
1 48h_Loin_pH 2023 B 5.59 0.132 5.52 5.62
2 48h_Loin_pH 2023 G 5.55 0.0764 5.52 5.59
3 48h_Loin_pH previous B 5.78 0.161 5.67 5.86
4 48h_Loin_pH previous G 5.76 0.151 5.67 5.83
5 Carcass_BF10 2023 B 1.26 0.210 1.15 1.4
6 Carcass_BF10 2023 G 0.875 0.186 0.775 0.962
7 Carcass_BF10 previous B 1.19 0.269 1 1.3
8 Carcass_BF10 previous G 0.810 0.193 0.7 0.9
9 Carcass_LEA 2023 B 6.52 0.912 6.05 6.9
10 Carcass_LEA 2023 G 7.37 0.938 6.8 7.95
# ℹ 82 more rows
Computing corrections factors and adjustments
Records need to be adjusted for sex effects. To accomplish this, for each phenotype I fit a model that includes: Sire (random effect), Off_Test_Date (random effect), Sex and Off_Test_Weight.
Everything but Sex are so called “nuisance” effects (effects we want to account for but that we are not interested in yet). Sex, on the other hand, is our effect of interest. We decide if there is a sex difference or not and then we figure out the correction factors for each phenotype such that corrected phenotypes will be comparable regardless of the sex of the tested pig.
Sex Correction factor using all data
All results are available upon request
Sex correction factors using only 2023 data
I repeated calculations of the sex correction factors for 3 datasets: 1) all data (above) 2) all data up to 2022, Used by Matt Ritter last year and not shown 3) only 2023 data (below)
General conclusion from these results: Using all data for computing sex adjustment vs using only 2023 data gives similar factors, but, as expected, the factors based on a very small dataset (2023) often are not significant and end up on a zero correction factor.
ABA should discuss this with Steibel to confirm that initial choice of using all data is still acceptable Using the sex correction factors from all data for now on.
Start to compute adjustements
Some phenotypes need to be corrected for on_test_weight or for marker_weight of the animals. Please see publication from NPPC in the Cybox folder to see an explanation for this. These are the same equations used by Stalder and Ritter in years past.
NPPC’s equations, used before for every Berkshire evaluation
- Adjusted ADG=ADG+0.005*(90-ON-Test-weight). Note: BF and Weight in lb
- Adjusted BF10=BF10+(290-Market_Weight)*(BF10/(Market_Weight-c)) note: c=30 for barrows and 5 for gilts
- Adjusted LEA=LEA+(290-Market_Weight)*(LEA/(Market_Weight+155))
Sex adjustments using previously computed coefficients (historical data)
Explained above. Here I include some graphics to show the effect of these corrections
Per-sire summary
In this section, I prepared the data for computing sire summaries and also corrected by year mean, which is needed for the selection indexes. This table is sortable and searchable.
Compute selection indexes using ABA index equations
Indexes are computed and joined to the individual phenotype summaries. Two tables are presented: 1) table only for indexes. 2) A wide table for all evaluated traits.
Producer-specific reports
Per-breeder individual reports are generated for all pigs that finished the test, but they are written to breeder-specific excell files for sharing with each breeder individually.