search for: iplus_new

Displaying 1 result from an estimated 1 matches for "iplus_new".

2012 Feb 21
0
BHHH algorithm on duration time models for stock prices
...e of the way i have written my loglikelihood or what. The loglikelihood LogLik<-function(param){ beta_1<-param[1] beta_2<-param[2] beta_3<-param[3] beta_4<-param[4] lambda.plus<-beta_1*Iplusless1 + beta_2*Iminusless1 lambda.minus<-beta_3*Iplusless1 + beta_4*Iminusless1 sum(Iplus_new*log(lambda.plus))-sum(log(lambda.plus)*x_new) + sum(Iminus_new*log(lambda.minus))-sum(log(lambda.minus)*x_new) } The gradients gradient<-function(param){ beta_1<-param[1] beta_2<-param[2] beta_3<-param[3] beta_4<-param[4] lambda.plus<-beta_1*Iplusless1 + beta_2*Iminusless1 lamb...