Food quality is part of the product profile of a cassava (Manihot esculenta Crantz) variety. A clone with high yield can still fail if consumers reject the gari and eba made from it. This vignette asks the question a breeder faces at the end of a testing cycle. Which clones beat the check on consumer acceptance, in each target market, and on which quality traits?
The cassava data come from consumer tests run by the
International Institute of Tropical Agriculture (IITA) under the
RTBFoods project in 2022, using the tricot approach [1]. In total, 1,000 consumers in Nigeria and
Cameroon each tasted eba from three of 13 cassava genotypes and ranked
them as best and worst for overall acceptance and for several quality
traits [2,3]. The data are also part of
the tricot data publication, with the trial ids given in
?cassava.
The workflow has five steps. We first check the trial design, then compare clones with the check in each market. We then look at the traits that drive acceptance and test for consumer segments within a market. Finally, we select clones against the target product profiles of the breeding programme, published in GloMIP.
We use gosset for the rankings, PlackettLuce [4] for the models, ggplot2 [5] for the charts and patchwork [6] to combine them.
library("gosset")
library("PlackettLuce")
library("ggplot2")
library("patchwork")
data("cassava", package = "gosset")
dat = cassava
# the columns with the three genotypes each consumer tasted
pack = c("option_a", "option_b", "option_c")
# the local check
check = "Obasanjo-2"
markets = c("Nigeria", "Cameroon")
Before any model, check which genotypes were tested in each market. Rankings only compare genotypes that the same consumers tasted.
design = table(unlist(dat[pack]), rep(dat$country, times = length(pack)))
design
##
## Cameroon Nigeria
## Akpu 0 113
## Game Changer 150 226
## Madame 150 0
## Obasanjo-2 150 226
## Sape 150 0
## TMEB1 0 112
## TMEB2 0 113
## TMEB3 0 112
## TMS1 150 224
## TMS2 150 225
## TMS3 150 225
## TMS6 0 224
## TMSIBA 150 0
shared = rownames(design)[rowSums(design > 0) == 2]
shared
## [1] "Game Changer" "Obasanjo-2" "TMS1" "TMS2" "TMS3"
The two markets tested different sets of genotypes, and only 5 of them, including the check, were tested in both. A single ranking of all 13 genotypes would compare clones that no consumer ever tasted side by side, and it would mix the effect of the genotype with the effect of the market. We therefore analyse each market on its own, and use the shared genotypes to compare the two markets.
Each market evaluated its own set of quality traits. The traits are
stored in pairs of columns, one for the best (_pos) and one
for the worst (_neg) genotype. We keep the traits with
answers in each market and convert them into rankings with
rank_tricot(). Answers where the same genotype was chosen
as best and worst are set aside with
validate.rankings = TRUE.
traits = list()
R = list()
for (m in markets) {
dat_m = dat[dat$country == m, ]
# traits with answers in this market
tr = sub("_pos$", "", grep("_pos$", names(dat_m), value = TRUE))
tr = tr[colSums(!is.na(dat_m[paste0(tr, "_pos")])) > 0]
traits[[m]] = tr
R[[m]] = lapply(tr, function(t) {
rank_tricot(dat_m,
items = pack,
input = paste0(t, c("_pos", "_neg")),
validate.rankings = TRUE)
})
names(R[[m]]) = tr
}
traits
## $Nigeria
## [1] "colour" "smoothness" "mouldability" "stretchability"
## [5] "taste" "overall"
##
## $Cameroon
## [1] "colour" "stretchability" "taste" "odour"
## [5] "firmness" "overall"
We fit one Plackett-Luce model per trait and market. The model
estimates the worth of each genotype, the probability that it is
preferred over all others. PlackettLuce() adds
pseudo-rankings by default (npseudo = 0.5), which connect
all genotypes and shrink the estimates slightly towards each other.
mod = lapply(R, function(r) lapply(r, PlackettLuce))
The function reliability() gives the probability that
each genotype is preferred over the check [7]. A value of 0.5 means consumers are
indifferent between the genotype and Obasanjo-2.
rel = lapply(markets, function(m) {
r = reliability(mod[[m]][["overall"]], ref = check)
r$market = m
r
})
rel = do.call("rbind", rel)
rel = rel[rel$item != check, ]
ggplot(rel, aes(x = reliability,
y = reorder(item, reliability))) +
geom_vline(xintercept = 0.5,
colour = "grey40",
linewidth = 0.8) +
geom_errorbar(aes(xmin = reliability - reliabilitySE,
xmax = reliability + reliabilitySE),
width = 0.2,
colour = "grey40") +
geom_point(size = 2.5, colour = "#2166ac") +
facet_wrap(~ market, scales = "free_y") +
theme_bw() +
theme(panel.grid.minor = element_blank()) +
labs(x = "Probability of being preferred over Obasanjo-2",
y = "")
Bars show one quasi-standard error. In Nigeria, the genotypes whose bars stay above 0.5 are TMS6. In Cameroon, they are Sape, Game Changer. These are the candidates for advancing in each market on overall acceptance.
The genotypes tested in both markets show whether consumers in Nigeria and Cameroon value the same clones. Because both markets used the same check, their probabilities of beating the check can be set side by side.
rel_shared = rel[rel$item %in% shared, ]
ggplot(rel_shared, aes(x = reliability, y = market)) +
geom_vline(xintercept = 0.5,
colour = "grey40",
linewidth = 0.8) +
geom_errorbar(aes(xmin = reliability - reliabilitySE,
xmax = reliability + reliabilitySE),
width = 0.2,
colour = "grey40") +
geom_point(size = 2.5, colour = "#2166ac") +
facet_wrap(~ item, ncol = 1) +
theme_bw() +
theme(panel.grid.minor = element_blank()) +
labs(x = "Probability of being preferred over Obasanjo-2",
y = "")
In Nigeria, no shared genotype beats Obasanjo-2. In Cameroon, Game Changer beats Obasanjo-2. The markets disagree on Game Changer, preferred over the check in one market and not in the other. A breeding programme serving both markets needs separate product profiles, or separate recommendations, for each.
The Kendall correlation (\(\tau\))
[8] between each quality trait and overall
acceptance shows which traits consumers weigh most when they make their
overall choice. kendallTau() computes it from the rankings
of each consumer.
kendall = lapply(markets, function(m) {
tr = setdiff(traits[[m]], "overall")
k = lapply(tr, function(t) {
kendallTau(R[[m]][[t]], R[[m]][["overall"]])
})
k = do.call("rbind", k)
k$trait = tr
k$market = m
k
})
kendall = do.call("rbind", kendall)
ggplot(kendall, aes(x = kendallTau,
y = reorder(trait, kendallTau))) +
geom_col(width = 0.6, fill = "#2166ac") +
facet_wrap(~ market, scales = "free_y") +
theme_bw() +
theme(panel.grid.minor = element_blank()) +
labs(x = "Kendall tau with overall acceptance",
y = "")
The trait most aligned with overall acceptance is taste in Nigeria and taste in Cameroon. These correlations are evidence for the weights of a product profile, as used in the selection index below.
The worth map shows how the genotypes of each market perform across all its traits. Values are log-worth relative to the average genotype.
maps = lapply(markets, function(m) {
worth_map(mod[[m]], labels = traits[[m]]) +
labs(title = m, x = "", y = "")
})
maps[[1]] / maps[[2]]
Consumers within a market may not agree either. A Plackett-Luce tree [4] splits consumers into groups with distinct rankings, using covariates such as gender, age, marital status and occupation. We fit it for overall acceptance in Nigeria, where all four covariates were recorded.
nga = dat$country == "Nigeria"
G = rank_tricot(dat[nga, ],
items = pack,
input = c("overall_pos", "overall_neg"),
group = TRUE,
validate.rankings = TRUE)
covar = dat[nga, c("gender", "age", "marital_status", "occupation")]
covar$gender = factor(covar$gender)
covar$marital_status = factor(covar$marital_status)
covar$occupation = factor(covar$occupation)
pld = cbind(G, covar)
tree = pltree(G ~ gender + age + marital_status + occupation,
data = pld,
alpha = 0.05,
minsize = 50)
tree
## Plackett-Luce tree
##
## Model formula:
## G ~ gender + age + marital_status + occupation
##
## Fitted party:
## [1] root: n = 600
## TMS3 TMS1 Game Changer TMS6 TMEB2 Obasanjo-2
## 0.00000000 -0.26676699 -0.26205642 0.67778779 -0.55932805 0.06194085
## Akpu TMS2 TMEB3 TMEB1
## -1.11942132 -0.73888695 -0.19687053 0.18196392
##
## Number of inner nodes: 0
## Number of terminal nodes: 1
## Number of parameters per node: 10
## Objective function (negative log-likelihood): 1004.345
The tree finds no split at the 0.05 level. Nigerian consumers rank the genotypes alike across gender, age, marital status and occupation, so one recommendation serves the whole market.
plot(tree, ref = check)
The same model can take any covariate collected with the rankings, such as the processing role of the consumer or the location of testing. Segments that persist across seasons are candidates for market segments in a breeding programme.
Breeding programmes record what each market needs in target product profiles (TPPs). In CGIAR and its national partners, these profiles are published in the Global Market Intelligence Platform (GloMIP) [9]. Each trait of a profile has a requirement level and a target. “Essential: Improve” traits must beat the check, “Essential: Maintain” traits must be at least as good as the check, and “Nice to Have” traits add value without being required.
The gari-eba trials match two processing profiles of the International Institute of Tropical Agriculture (IITA), TPP00599 for white cassava for processing in West Africa (Nigeria) and TPP00600 for Central Africa (Cameroon). Both list eba colour, eba texture and taste among their quality traits. We map the traits that consumers ranked onto the traits of each profile. The texture traits of the tricot trials all map onto “Eba Texture”, and odour is not part of the Cameroon profile.
# requirement levels of the profile traits, GloMIP, retrieved 30 November 2026
# TPP00599 (Nigeria) and TPP00600 (Cameroon)
tpp = data.frame(
market = rep(markets, each = 5),
trait = c("colour", "smoothness", "mouldability", "stretchability", "taste",
"colour", "firmness", "stretchability", "taste", "odour"),
tpp_trait = c("Eba Color", "Eba Texture", "Eba Texture", "Eba Texture", "Taste",
"Eba Color", "Eba Texture", "Eba Texture", "Taste", NA),
requirement = c(rep("Essential: Maintain", 4), "Nice to Have",
rep("Essential: Maintain", 4), NA)
)
The profiles set requirement levels but no economic weights, so the selection takes two steps.
The weights of step 2 are a rule of this vignette, not values from GloMIP. Replace them with economic weights when the breeding programme has them.
gate = data.frame()
for (m in markets) {
essential = tpp$trait[tpp$market == m & grepl("^Essential", tpp$requirement)]
for (t in essential) {
r = reliability(mod[[m]][[t]], ref = check)
r = r[r$item != check, ]
gate = rbind(gate, data.frame(market = m,
trait = t,
item = as.character(r$item),
reliability = r$reliability,
worse = r$reliability + r$reliabilitySE < 0.5))
}
}
gate[gate$worse, ]
## market trait item reliability worse
## 2 Nigeria colour TMS1 0.3640075 TRUE
## 3 Nigeria colour Game Changer 0.4404372 TRUE
## 5 Nigeria colour TMEB2 0.3830909 TRUE
## 6 Nigeria colour Akpu 0.2004093 TRUE
## 7 Nigeria colour TMS2 0.2310127 TRUE
## 10 Nigeria smoothness TMS3 0.4306460 TRUE
## 12 Nigeria smoothness Game Changer 0.4148406 TRUE
## 14 Nigeria smoothness TMEB2 0.3366812 TRUE
## 15 Nigeria smoothness Akpu 0.3003557 TRUE
## 16 Nigeria smoothness TMS2 0.3329491 TRUE
## 19 Nigeria mouldability TMS3 0.4629950 TRUE
## 20 Nigeria mouldability TMS1 0.4105054 TRUE
## 21 Nigeria mouldability Game Changer 0.3983001 TRUE
## 23 Nigeria mouldability TMEB2 0.3546427 TRUE
## 24 Nigeria mouldability Akpu 0.3280368 TRUE
## 25 Nigeria mouldability TMS2 0.3245429 TRUE
## 27 Nigeria mouldability TMEB1 0.4439805 TRUE
## 29 Nigeria stretchability TMS1 0.4630460 TRUE
## 30 Nigeria stretchability Game Changer 0.4677552 TRUE
## 37 Cameroon colour TMS1 0.2183511 TRUE
## 38 Cameroon colour TMSIBA 0.3893608 TRUE
## 41 Cameroon colour TMS2 0.3520253 TRUE
## 42 Cameroon colour TMS3 0.3881424 TRUE
## 44 Cameroon firmness TMS1 0.3620708 TRUE
## 45 Cameroon firmness TMSIBA 0.4310833 TRUE
## 48 Cameroon firmness TMS2 0.4483215 TRUE
## 51 Cameroon stretchability TMS1 0.3087935 TRUE
## 52 Cameroon stretchability TMSIBA 0.4318159 TRUE
## 55 Cameroon stretchability TMS2 0.4342885 TRUE
## 58 Cameroon taste TMS1 0.3333058 TRUE
## 59 Cameroon taste TMSIBA 0.4409745 TRUE
## 62 Cameroon taste TMS2 0.4685124 TRUE
In Nigeria, Akpu (colour and smoothness and mouldability), Game Changer (colour and smoothness and mouldability and stretchability), TMEB1 (mouldability), TMEB2 (colour and smoothness and mouldability), TMS1 (colour and mouldability and stretchability), TMS2 (colour and smoothness and mouldability), TMS3 (smoothness and mouldability) fall below the check and leave the selection. In Cameroon, TMS1 (colour and firmness and stretchability and taste), TMS2 (colour and firmness and stretchability and taste), TMS3 (colour), TMSIBA (colour and firmness and stretchability and taste) fall below the check and leave the selection.
We then compute the profile weights and, for comparison, the data weights from the Kendall correlations above. The data weights show how consumers themselves weigh each trait when they make their overall choice.
tier = c("Essential: Improve" = 3, "Essential: Maintain" = 2, "Nice to Have" = 1)
tpp$tier = ifelse(is.na(tpp$requirement), 0, tier[tpp$requirement])
# tricot traits that map onto the same profile trait share its weight
key = paste(tpp$market, tpp$tpp_trait)
tpp$weight = tpp$tier / ave(tpp$tier, key, FUN = length)
tpp$weight = ave(tpp$weight, tpp$market, FUN = function(x) x / sum(x))
profile_weights = lapply(markets, function(m) {
x = tpp[tpp$market == m, ]
setNames(x$weight, x$trait)
})
data_weights = lapply(markets, function(m) {
k = kendall[kendall$market == m, ]
w = pmax(k$kendallTau, 0)
setNames(w / sum(w), k$trait)
})
names(profile_weights) = names(data_weights) = markets
weights = do.call("rbind", lapply(markets, function(m) {
data.frame(market = m,
trait = names(profile_weights[[m]]),
profile = round(profile_weights[[m]], 2),
data = round(data_weights[[m]][names(profile_weights[[m]])], 2))
}))
rownames(weights) = NULL
weights
## market trait profile data
## 1 Nigeria colour 0.40 0.20
## 2 Nigeria smoothness 0.13 0.20
## 3 Nigeria mouldability 0.13 0.21
## 4 Nigeria stretchability 0.13 0.10
## 5 Nigeria taste 0.20 0.29
## 6 Cameroon colour 0.33 0.16
## 7 Cameroon firmness 0.17 0.22
## 8 Cameroon stretchability 0.17 0.20
## 9 Cameroon taste 0.33 0.23
## 10 Cameroon odour 0.00 0.19
Consumers weigh taste in Nigeria and odour in Cameroon more than the profiles do. Gaps like these are evidence to bring back to the breeding team when the profile is revised.
selection_score = function(models, w) {
items = names(coef(models[["overall"]], log = FALSE))
worth = sapply(names(w), function(t) {
coef(models[[t]], log = FALSE)[items]
})
score = as.vector(worth %*% w)
data.frame(item = items, score = score)
}
select = data.frame()
for (m in markets) {
for (s in c("Profile weights", "Data weights")) {
w = if (s == "Profile weights") profile_weights[[m]] else data_weights[[m]]
x = selection_score(mod[[m]], w)
x$market = m
x$scheme = s
select = rbind(select, x)
}
}
failed = paste(gate$market, gate$item)[gate$worse]
select$gate = ifelse(paste(select$market, select$item) %in% failed,
"Worse than the check",
"Passes the gate")
average = data.frame(market = markets,
average = sapply(markets, function(m) {
1 / length(coef(mod[[m]][["overall"]]))
}))
ggplot(select, aes(x = score, y = reorder(item, score), fill = gate)) +
geom_col(width = 0.6) +
geom_vline(data = average,
aes(xintercept = average),
linetype = "dashed",
colour = "grey40") +
facet_grid(market ~ scheme, scales = "free_y", space = "free_y") +
scale_fill_manual(values = c("Passes the gate" = "#2166ac",
"Worse than the check" = "grey75")) +
theme_bw() +
theme(panel.grid.minor = element_blank(),
legend.position = "bottom") +
labs(x = "Selection score", y = "", fill = "")
With the profile weights, in Nigeria TMS6, TMEB3 score above Obasanjo-2, and in Cameroon Game Changer, Sape, Madame score above Obasanjo-2. With the data weights, in Nigeria TMS6 scores above Obasanjo-2, and in Cameroon Game Changer, Sape, Madame score above Obasanjo-2. Clones that pass the gate and score above the check under both weightings are the strongest candidates to advance on food quality. Clones whose rank depends on the weights show where the decision rests on the product profile.
The quality traits in these profiles are all “maintain” traits, so consumer acceptance works as a gate. The improvement targets of the profiles, such as dry matter, product conversion rate and fresh yield, come from on-station and on-farm trials, and the gate and index above can be combined with them in the final selection.
Consumer rankings from tricot trials answer a breeding question directly, which clones beat the check on food quality in each target market. The design check comes first, because genotypes tested in different markets cannot be compared in one model. Within each market, reliability against the check, the traits that drive acceptance and the consumer segments give the evidence for advancing clones. Linking the rankings to the target product profiles in GloMIP turns this evidence into a selection decision, and the comparison of profile and data weights feeds consumer evidence back into the profiles.