I try to calculate the elements of a matrix, I wrote the elements normarly but when I run it, I received this error message:
I[1,1] <- ((1/n)*sum(delta*(((1/alp)-h(x)-(M(x)/(1-W(x))))^2)))
Error in I[1, 1] <- ((1/n) * sum(delta * (((1/alp) - h(x) - (M(x)/(1 - : object of type 'closure' is not subsettable
I[2,2] <- ((1/n)*sum(delta*(((1/b)+log(A(x))-R(x)))^2))
Error in I[2, 2] <- ((1/n) * sum(delta * (((1/b) + log(A(x)) - R(x)))^2)) : object of type 'closure' is not subsettable
I[3,3] <- ((1/n)*sum(delta*(((1/d)-(x^gam)-T(x)+((x^gam)))/((((1-exp(-d*x^gam)))*B(x))^2))))
Error in I[3, 3] <- ((1/n) * sum(delta * (((1/d) - (x^gam) - T(x) + ((x^gam)))/((((1 - : object of type 'closure' is not subsettable
I[4,4] <- ((1/n)*sum(delta*((1/gam)+log(x)-(d*(x^gam)*log(x))*D(x)-((d*(x^gam)*log(x)*exp(-d*x^gam))/(1-exp(-d*x^gam)))*N(x))^2))
Error in I[4, 4] <- ((1/n) * sum(delta * ((1/gam) + log(x) - (d * (x^gam) * : object of type 'closure' is not subsettable
I am not sure why as I changed nothing in my code.