agriME is an R package for reproducible agricultural
marketing-efficiency and price-spread analysis. It works with either
channel-level totals or a full stage-by-stage chain such as Producer
-> Wholesaler -> Retailer -> Consumer.
| Output | Definition used |
|---|---|
| Price spread | Consumer price minus net producer price |
| Price-spread percentage | Price spread divided by consumer price, times 100 |
| Producer’s share | Net producer price divided by consumer price, times 100 |
| Total gross marketing margin | Same monetary gap as price spread when the producer price is net |
| Acharya efficiency | Net producer price divided by total marketing cost plus net intermediary margin |
| Shepherd efficiency | Consumer price divided by total marketing cost; an optional net-ratio variant subtracts one |
| Conventional efficiency | Value added by marketing divided by total marketing cost |
Install the checked source tarball supplied with the release bundle:
install.packages("agriME_0.1.0.tar.gz", repos = NULL, type = "source")
library(agriME)After publication on CRAN, installation will be:
install.packages("agriME")
library(agriME)marketing_metrics(
producer_price = 1900,
consumer_price = 3150,
marketing_cost = 510,
marketing_margin = 740,
channel = "Producer-Wholesaler-Retailer"
)data(tomato_channels)
fit <- analyse_channels(tomato_channels)
fit
summary(fit)
consumer_rupee(fit)
rank_channels(fit)
plot(fit, type = "decomposition")
plot(fit, type = "efficiency")The required stage-level fields are:
| Field | Meaning |
|---|---|
channel |
Channel identifier |
stage |
Integer order within the channel |
actor |
Producer or intermediary name |
actor_type |
producer for exactly one first-stage row; otherwise
intermediary |
purchase_price |
Actor purchase price per common unit; use 0 or NA for
producer |
sale_price |
Actor sale price per the same unit |
marketing_cost |
Actor marketing cost per the same unit |
Use equivalent commodity quality, form, time, location, and quantity across channels. The validator reports broken price links and accounting gaps rather than silently treating inconsistent records as efficiency differences.
data(market_observations)
ci <- bootstrap_marketing_metrics(
market_observations,
channel = "channel",
R = 499,
seed = 2026
)
ci
plot(ci, metric = "acharya_efficiency")sens <- marketing_sensitivity(
producer_price = 1900,
consumer_price = 3150,
marketing_cost = 510,
marketing_margin = 740,
producer_change = c(-0.05, 0, 0.05),
cost_change = c(-0.10, 0, 0.10)
)
sens
plot(sens, metric = "acharya_efficiency")
efficiency_target(
target = 2,
method = "acharya",
solve_for = "marketing_cost",
producer_price = 1900,
marketing_margin = 740
)Efficiency ratios are descriptive accounting indicators. A high ratio does not, by itself, prove that a channel is competitive, equitable, causally superior, or socially optimal. Added services, quality transformation, risk bearing, losses, seasonality, and transaction volume must be considered when comparing channels.