data <- data.frame(
yield = c(1200, 1350, 1100, 1450, 1280, 1380, 1220, 1400),
pods = c(45, 52, 42, 58, 48, 54, 46, 56),
seeds = c(8.2, 9.1, 7.8, 9.5, 8.5, 9.0, 8.3, 9.3),
weight = c(32, 35, 30, 38, 33, 36, 31, 37)
)
path_analysis(data, dependent = "yield",
independent = c("pods", "seeds", "weight"))
Run the code above in your browser using DataLab