powered by
Considering a Laplace Distribution calculates the log-density $$ld = log(0.5) + log(\lambda) - \lambda * |y - \mu|$$
# S3 method for modello_number ldlaplace(y, mu, lam)ldlaplace(y, mu, lam)
ldlaplace(y, mu, lam)
observations, numeric or reference object of class 'number'
location parameter, numeric or reference object of class 'number'
rate parameter, numeric of reference object of class 'number'
Returns a 'numeric' or a reference object of class 'number'
# NOT RUN { modello.init(10, 10, 10, 10) y = number(rnorm(10)) ld = ldlaplace(y, .k(0), .k(1)) print(ld) print(ld$v) modello.close() # }
Run the code above in your browser using DataLab