add Ghosh matrices
Ghosh matrices (B and G in Miller and Blair 2nd ed. Ch12) provide the equivalent to A and L Leontief matrices for downstream effects (as opposed to upstream).
Initial scripts provided in https://github.com/USEPA/USEEIO_team/commit/b0832995c74f363d893cb765c429deb61d09d022 and https://github.com/USEPA/USEEIO_team/commit/a27178d4fad6f0789da295e86d0f66f57d08da23
This issue suggests addition of Ghosh matrices to model object. But at this point in this code its only a needed to compute getSectorLinkages(). Rename this issue to rescope it until the time when we want it to be part of the model object.
q <- model$q # total commodity output
x <- model$x # total industry output
A <- model$A
if(model$specs$CommodityorIndustryType == "Commodity") {
B <- solve(diag(q)) %*% A %*% diag(q)
} else if(model$specs$CommodityorIndustryType == "Industry") {
B <- solve(diag(x)) %*% A %*% diag(x)
}
- [x] Implement option to handle parameter
use_domestic_requirements