Skip to content

Commit

Permalink
Fixing bug in Ghosh B
Browse files Browse the repository at this point in the history
  • Loading branch information
juliechenerg committed Jan 30, 2025
1 parent d3d3543 commit e66e69b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/CalculationFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,9 @@ calculateGhoshB <- function(model,use_domestic_requirements=FALSE) {
x <- model$x # total industry output
A <- model$A
if(model$specs$CommodityorIndustryType == "Commodity") {
B <- solve(diag(x)) %*% A %*% diag(x)
} else if(model$specs$CommodityorIndustryType == "Industry") {
B <- solve(diag(q)) %*% A %*% diag(q)
} else if(model$specs$CommodityorIndustryType == "Industry") {
B <- solve(diag(x)) %*% A %*% diag(x)
}

row.names(B) <- model$Commodities$Code_Loc
Expand Down

0 comments on commit e66e69b

Please sign in to comment.