Displaying 1 result from an estimated 1 matches for "loglikfunc3".
Did you mean:
loglikfun
2007 Jun 15
0
Question with nlm
...I could get some help here. I'm using nlm to minimize my negative log likelihood function. What I did is as follows:
My log likelihood function (it returns negative log likelihood) with 'gradient' attribute defined inside as follows:
# ==========Method definition======================
logLikFunc3 <- function(sigma, object, totalTime) {
y <- as.matrix(object at data$output[1:totalTime,1]);
x <- as.matrix(object at data$input[1:totalTime,]);
# compute necessary matrices
M <- as.matrix(object at model$M);
P <- diag(sigma*sigma);
A <- AMatrix(totalTime,...