useeior icon indicating copy to clipboard operation
useeior copied to clipboard

add Ghosh matrices

Open bl-young opened this issue 1 year ago • 1 comments

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).

bl-young avatar May 28 '24 13:05 bl-young

Initial scripts provided in https://github.com/USEPA/USEEIO_team/commit/b0832995c74f363d893cb765c429deb61d09d022 and https://github.com/USEPA/USEEIO_team/commit/a27178d4fad6f0789da295e86d0f66f57d08da23

bl-young avatar May 28 '24 13:05 bl-young

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.

WesIngwersen avatar Jan 31 '25 14:01 WesIngwersen

  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

WesIngwersen avatar Jan 31 '25 14:01 WesIngwersen