Hi I have been having issue with a ML estimator for Jump diffusion process but know I am get little error I didn't notice before like I am try to create a vector > #GBMPJ MLE Combined Ph 1 LR > # > 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 = "Newton-Raphson") Error in c(1, 1, 1, 1, 1) : unused argument(s) (1, 1, 1) then below in the maxLik it is not seem to be taking my other starting value and I am not sure why? If anyone can help me that would be great. Thanks, JP [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.