Why the parameter I am trying to estimate is “not found”?
问题 I am trying to optimise my likelihood function of R_j and R_m using optim to estimate al_j , au_j , b_j and sigma_j . This is what I did. a = read.table("D:/ff.txt",header=T) attach(a) a R_j R_m 1 2e-03 0.026567295 2 3e-03 0.009798475 3 5e-02 0.008497274 4 -1e-02 0.012464578 5 -9e-04 0.002896023 6 9e-02 0.000879473 7 1e-02 0.003194435 8 6e-04 0.010281122 The parameters al_j, au_j, b_j and sigma_j need to be estimated. llik=function(R_j,R_m) if(R_j< 0) { sum[log(1/(2*pi*(sigma_j^2)))-(1/(2*