> B_linkages <- function (J,j) {sum((X-X_omit(J,j))/X[j+56*(J-1)])}
> B_linkages(1,1)
[1] 0.9723767
This one works just fine but
> B_linkages_inter <- function (I,J) {
+ for (j in 1:56) {
+ for (i in 1:56) {
+ sum((X[i+56*(I-1)]-X_omit(J,j)[i+56*(I-1)])/X[j+56*(J-1)])
+ }
+ }
+ }
>
> B_linkages_inter(1,1)
> 1+2
[1] 3
B_linkages_inter(1,1) does not return any output compared to the previous function.
> 1+2
[1] 3
is what I did to check if the R has stopped or not. Why isn't "B_linkages_inter(1,1)" showing any results? X is an 2464*2464 matrix, X_omit(J,j) is a function which generates a matrix using the inverse of a 2464*2464 matrix.