Dear all, I am trying to ML estimate a model from http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1884237 and the following code, with Rng being the variable of interest, 

 

RANGE = Rng

scalar rng = 0.1

scalar err = 0.2

scalar gamma = 1

mle ll = 0.5*ln(theta) - theta*lambda + RANGE *(ln(RANGE)-1) - lngamma(RANGE+1) + theta*RANGE( 1 + ln(lambda/RANGE)) 

    series lambda = mean(RANGE)

    series lambda = c + rng*RANGE(-1) + err*lambda(-1)

    params gamma c rng err

end mle --robust

 

returns "lag order: argument 2 should be scalar, is series. Data types not conformable for operation". As far as I undestand, the problem is the first element of LL, but have no clue how to correct it. Any hint is much appreciated. 

Best, 

Daniel