Questions tagged [mle]

In statistics, maximum-likelihood estimation (MLE) is a method of estimating the parameters of a statistical model.

In statistics, maximum-likelihood estimation (MLE) is a method of estimating the parameters of a statistical model.

366 questions
2
votes
1 answer

Why are the predicted values of my GLM cyclical?

I wrote a binomial regression model to predict the prevalence of igneous stone, v, at an archaeological site based on proximity to a river, river_dist, but when I use the predict() function I'm getting odd cyclical results instead of the curve I was…
2
votes
1 answer

How to find the alpha parameter of beta distribution

I am trying to find the MLE estimate of alpha of a beta distribution given beta = 1. I tried using maxlogL from the estimationtools package but g x <- rbeta(n = 1000, shape1 = 0.7, shape2 = 1) alpha_hat <- maxlogL(x = x, dist = "dbeta", fixed =…
EefNL
  • 23
  • 2
2
votes
2 answers

Error in optim: function cannot be evaluated at initial parameters for Maximum likelihood estimation

The code is this: lm.loglik3 <-function(y, x, theta){N <-length(y)# theta contains our parameters to be estimated beta0 <- theta[1] beta1 <- theta[2] sigma2 <- theta[3]# x contains our covariates x1 <- x logl <--N/2* log(2*pi*sigma2)-1/(2*sigma2)*…
Luke
  • 21
  • 5
2
votes
2 answers

estimating lambda for a exponential distribution using method of MLE

I am attempting to estimate lambda using the method of maximum likelihood estimation. Here is the code I am using: set.seed(0) x=rexp(100,10) plot(x) fn <- function(lambda){ length(x)*log(lambda)-lambda*sum(x) } plot(fn) optim(lambda, fn)…
Danielr13
  • 19
  • 2
2
votes
1 answer

Using MLE function to estimate the parameters of a custom distribution

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…
nashynash
  • 375
  • 2
  • 19
2
votes
0 answers

mle2-class Weibull three-parameter probability density function plot

I am fitting my data (wind data) to different distributions (two and three parameter weibull and gamma distributions). I used the method explained here (mle2 using "L-BFGS-B" method) to estimate the parameters of the three-parameter weibull…
Ayik
  • 21
  • 2
2
votes
1 answer

NaN errors with bbmle

This question relates to my previous question here and the data set presented in the paper A New Generalization of Linear Exponential Distribution: Theory and Application. For this data, adapting the code proposed by Ben Bolker, we…
Will
  • 190
  • 7
2
votes
1 answer

Coding a log-likelihood function in MATLAB

I am following a very detailed post from Quantitative Finance, however, my problem is a coding one. I am trying to estimate a GARCH(1,1) model (not using a statistical toolbox and rather a long hand method, the reason for this is I really want to…
2
votes
0 answers

How do you pass vocabulary text files to a model and train it on google cloud platforms machine learning engine

I am trying to make a DNNCLassifier that takes categorical inputs using tensor flow to train a model on the Google Cloud Platform (GCP). I have a few categorical feature columns where I use a vocabulary.txt file. For…
2
votes
1 answer

Maximum Likelihood Estimation with statsmodels overcomplicates things? Hoping for Recommendations

After taking a couple advanced statistics courses, I decided to code some functions/classes to just automate estimating parameters for different distributions via MLE. In Matlab, the below is something I easily coded once: function [ params, max,…
Coolio2654
  • 1,589
  • 3
  • 21
  • 46
2
votes
0 answers

Negative distribution parameters generated by optim for log likelihood of zero-inflated negative binomial

I'm trying to fit a zero-inflated negative binomial distribution to count data by minimizing the negative of the log likelihood function with optim. I've defined the negative log likelihood with 'newfunct' below: newfunct <-…
Ellen
  • 21
  • 2
2
votes
0 answers

R dlmMLE multivariate model estimation

I am attempting to estimate a multivariate state space model using the dlmMLE function in R as part of the dlm library but keep getting the below error. Error in fit < dlmMLE(Y, parm = c(rep(0, 10)), build = model) : comparison of these types is…
Stefan
  • 41
  • 4
2
votes
1 answer

Maximum Likelihood Estimation by hand for normal distribution in R

I am a newbie in R and searched in several forums but didn't got an answer so far. We are asked to do a maximum likelihood estimation in R for an AR(1) model without using the arima() command. We should estimate the intercept alpha, the coefficient…
2
votes
1 answer

Plotting a linear decision boundary

I have a set of data points (40 x 2), and I've derived the formula for the decision boundary which ends up like this : wk*X + w0 = 0 wk is a 1 x 2 vector and X is a 2 x 1 point from the data point set; essentially X = (xi,yi), where i = 1,2,...,40.…
newb
  • 23
  • 1
  • 3
2
votes
0 answers

failed dlmMLE results

I am trying to estimate the parameters for a local level dlm with some time series data. This is the code I am using, and it seems to "work", in the sense that it does not throw any warning/error: buildSu<- function(x) { Vsd<-(x[1:10]) …
f.mezzani
  • 21
  • 1