mle

Error: “initial value in 'vmmin' is not finite” not in mle2() but in confint()

 ̄綄美尐妖づ 提交于 2019-12-02 07:22:15
I know the web is plastered with questions (and answers) about the 'initial value in vmmim is not finite' error when trying to fit parameters for an mle2 object. I do not have this error when creating my mle2 object, but I DO get this error when trying to find the 95% CI for a parameter from an mle2 object. Here is a reproducible example: Here are the data: d = structure(list(SST_1YR = c(11.6, 11.7, 11.9, 12, 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.7, 12.8, 12.9, 13, 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 13.8, 13.9, 14, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 15, 15.1, 15.2, 15.3,

MLE error in R: initial value in 'vmmin' is not finite

不想你离开。 提交于 2019-12-01 03:26:18
Suppose I have 2 data.frame objects: df1 <- data.frame(x = 1:100) df1$y <- 20 + 0.3 * df1$x + rnorm(100) df2 <- data.frame(x = 1:200000) df2$y <- 20 + 0.3 * df2$x + rnorm(200000) I want to do MLE. With df1 everything is ok: LL1 <- function(a, b, mu, sigma) { R = dnorm(df1$y - a- b * df1$x, mu, sigma) -sum(log(R)) } library(stats4) mle1 <- mle(LL1, start = list(a = 20, b = 0.3, sigma=0.5), fixed = list(mu = 0)) > mle1 Call: mle(minuslogl = LL1, start = list(a = 20, b = 0.3, sigma = 0.5), fixed = list(mu = 0)) Coefficients: a b mu sigma 23.89704180 0.07408898 0.00000000 3.91681382 But if I would

Using MLE function to estimate the parameters of a custom distribution

瘦欲@ 提交于 2019-11-29 16:37:02
I am trying to use mle() function in MATLAB to estimate the parameters of a 6-parameter custom distribution. The PDF of the custom distribution is and the CDF is where Γ (x,y) and Γ (x) are the upper incomplete gamma function and the gamma function , respectively. α , θ , β , a , b , and c are the parameters of the custom distribution. K is given by Given a data vector ' data ', I want to estimate the parameters α , θ , β , a, b, and c. So, far I have come up with this code: data = rand(20000,1); % Since I cannot upload the acutal data, we may use this t = 0:0.0001:0.5; fun = @(w,a,b,c) w^(a-1