I was using the function 'mle' to calculate the maximum likelihood estimate for my parameters using the package "stats4". However, when I construct my negative log-likelihood function and put it into mle function with some initial values, it just shows the following error:
Error in mle(NW, start = list(bandwidth = matrix(0.1, ncol = 2, nrow = 20), :
Mismatch in length of start values"
I know this may be due to the initial values I gave may not match with what I put in the NW function. However, I checked again and again and did not find anything wrong and I can actually compute the NW (the negative log-likelihood value) with the initial values
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one: