search for: loglikval

Displaying 2 results from an estimated 2 matches for "loglikval".

Did you mean: logikal
2009 Apr 10
1
Re MLE Issues
...# > n<-length(combinedlrph1) > j<-c(1,2,3,4,5,6,7,8,9,10) Error in c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) : unused argument(s) (3, 4, 5, 6, 7, 8, 9, 10) > gbmploglik<-function(param){ + mu<-param[1] + sigma<-param[2] + lamda<-param[3] + nu<-param[4] + gama<-param[5] + logLikVal<- - n*lamda - .5*n*log(2*pi) + sum((for(i in 1:n)(log(sum(for(j in 1:10)(((lamda^j/factorial(j))*(1/((sigma^2+j*gama^2)^.5)*exp( - (combinedlrph1-mu-j*nu)^2/2*(sigma^2+j*gama^2)))))))))) + logLikVal + } > rescbj<- maxLik(gbmploglik, grad = NULL, hess = NULL, start=c( 1, 1, 1, 1, 1), method...
2009 Apr 03
2
Geometric Brownian Motion Process with Jumps
...ed this into my log-likelihood equation, know I am getting a message: NA in the initial gradient My codes is hear # n<-length(combinedlr) j<-c(1,2,3,4,5,6,7,8,9,10) gbmploglik<-function(param){ mu<-param[1] sigma<-param[2] lamda<-param[3] nu<-param[4] gama<-param[5] logLikVal<- - n*lamda - .5*n*log(2*pi) + sum(log(sum(for(j in 1:10)(cat((lamda^j/factorial(j))*(1/((sigma^2+j*gama^2)^.5)*exp( - (combinedlr-mu-j*nu)^2/2*(sigma^2+j*gama^2)))))))) logLikVal } rescbj<- maxLik(gbmploglik, grad = NULL, hess = NULL, start=c(0,1,1,1,1), method = "Newton-Raphson")...