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
4
votes
1 answer

Using `bbmle:mle2` with vector parameters (already works using `optim`)

I am having some trouble using the bbmle:mle2 function when trying to do regression. To illustrate my problem, I have come up with a toy example. We define the minus log-likelihood for the Poisson distribution (or any custom distribution): LL <-…
K. Brix
  • 143
  • 5
4
votes
1 answer

Maximum Likelihood Estimator for a Gamma density in R

I just simulated 100 randoms observations from a gamma density with alpha(shape parameter)=5 and lambda(rate parameter)=5 : x=rgamma(100,shape=5,rate=5) Now, I want to fin the maximum likelihood estimations of alpha and lambda with a function that…
Mercier
  • 91
  • 3
  • 10
4
votes
1 answer

Passing function parameters to mle() for log likelihood

I'm estimating a logit regression with multiple predictor variables by hand in R using the mle() method. I'm having trouble passing along the additional arguments needed to calculate log likelihood in the function calcLogLikelihood below. Here's my…
svenkatesh
  • 1,152
  • 2
  • 10
  • 25
4
votes
1 answer

Gaussian mixture modeling with mle2/optim

I have an mle2 model that I've developed here just to demonstrate the problem. I generate values from two separate Gaussian distributions x1 and x2, combine them together to form x=c(x1,x2), and then create an MLE that attempts to re-classify x…
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
3
votes
1 answer

Error in mle R function: L-BFGS-B needs finite values of 'fn'

I am trying to use MLE on my data in R, but I get this error and I don't know why: Error in optim(start, f, method = method, hessian = TRUE, ...) : L-BFGS-B needs finite values of 'fn' This is my code: negative_likelihood <- function(mu,…
MMRA
  • 337
  • 1
  • 3
  • 11
3
votes
1 answer

Parameter Estimation with mle in pyomo

I want to estimate the parameters of an RL model from a behavioral dataset with pyomo. #dummy data dis_data = pd.DataFrame([0,1,0,0,0,1], columns=['reward']) dis_data['Expt']=str(1) dis_data = dis_data.set_index('Expt') def…
faraa
  • 575
  • 3
  • 14
  • 42
3
votes
0 answers

Is there a .fit function for discrete distributions in scipy stats?

I am trying to .fit a Poisson distribution to calculate a MLE for my data. I noticed there is a .fit for continuous functions in scipy stats, but no .fit for discrete functions. Is there another API that has a .fit function for discrete…
Tyler Oleson
  • 187
  • 1
  • 9
3
votes
1 answer

How to fit double exponential distribution using MLE in python?

I am trying to fit a double-exponential (i.e. mixture of two exponential or bi-exp) data using MLE. Though there is no direct example of such a problem, yet I found some hint of using MLE for linear (Maximum Likelihood Estimate pseudocode),…
SCBera
  • 33
  • 1
  • 8
3
votes
1 answer

fitting an inverse gaussian distribution to data in R

Im trying to use the fitdist function in R to fit data to three different distributions by maximum likelihood to compare them. Lognormal and Weibull work fine, but I am struggling with Inverse Gaussian. I need to specify starting values, however…
sam
  • 31
  • 1
  • 4
3
votes
1 answer

Retrieve optimization results from MLE by scipy.stats.fit()?

I am trying to estimate different distributions' parameters via scipy.stats."some_dist".fit(), and I'm having extreme difficulty retrieving any information on the optimization process being used. Specifically, I am looking for the Hessian, which…
Coolio2654
  • 1,589
  • 3
  • 21
  • 46
3
votes
0 answers

Calculate standard errors for Maximum Likelihood Estimates using scipy.minimize

I am trying to use scipy.minimize constrained optimization to calculate maximum likelihood estimates in Python. However, I am not sure how to get the standard errors directly from the optimization results of scipy.minimize. As far as I understand,…
user3821012
  • 1,291
  • 2
  • 16
  • 27
3
votes
1 answer

How does SciPy stats.norm.fit determine the parameters

this may not be a suitable question for this forum, but I was just wondering if anyone knows how SciPy's stats.norm.fit() method determines distribution parameters? I read somewhere that it uses Maximum Likelihood Estimation, but I cannot find any…
BillyJo_rambler
  • 563
  • 6
  • 23
3
votes
1 answer

Vectorized normal distribution python

Possibly a dumb question so forgive me but, From here: N = 10000 x = 10 + 2*np.random.randn(N) y = 5 + x + np.random.randn(N) def neg_loglike(const,coef,std): mu = const + coef*x print(mu.shape) return -1*stats.norm(mu,…
RSHAP
  • 2,337
  • 3
  • 28
  • 39
3
votes
1 answer

Why do we choose Beta distribution as a prior on hypothesis?

I saw machine learning class videos of course 10-701 year 2011 by Tom Mitchell at CMU. He was teaching on topic Maximum Likelihood Estimation when he used Beta distribution as prior on theta, I wonder he chose that only?
3
votes
3 answers

Power Law Fit of cut-off distribution with the poweRlaw package

I am currently trying to find a way to calculate a power-law fit for a cut-off distribution with MLE. The distribution looks as follows: As you can see, I was able to fit the whole distribution (Power-law fit) and also the lower bound (exp-fit)…
Max
  • 31
  • 3
1
2
3
24 25