Displaying 1 result from an estimated 1 matches for "find_aic".
Did you mean:
bind_tic
2008 May 23
0
Est. Component Size with AIC/BIC under Gamma Distribution
...is the code I have.
__BEGIN__
mlogl <- function( x_func, theta_func, samp) {
# computing log_likelihood
return( - sum(dgamma(samp, shape = x_func, scale=theta_func, log = TRUE)))
}
find_bic <- function(mll,smpl,k) {
bic <- (-2 * mll) + (k * log(length(smpl)))
bic
}
find_aic <- function(mll,smpl,k) {
aic <- (-2 * mll) + (k * 2)
aic
}
mlogl_process <- function(smpl,error,start ) {
# EM algorithm to estimate max loglikelihood
thetalast <- 0
thetacurrent <- start
theta <- start
difference <- start
thetaprocess &...