similar to: bbmle "Warning: optimization did not converge"

Displaying 20 results from an estimated 800 matches similar to: "bbmle "Warning: optimization did not converge""

2012 Oct 05
2
problem with convergence in mle2/optim function
Hello R Help, I am trying solve an MLE convergence problem: I would like to estimate four parameters, p1, p2, mu1, mu2, which relate to the probabilities, P1, P2, P3, of a multinomial (trinomial) distribution. I am using the mle2() function and feeding it a time series dataset composed of four columns: time point, number of successes in category 1, number of successes in category 2, and
2011 Oct 17
1
simultaneously maximizing two independent log likelihood functions using mle2
Hello, I have a log likelihood function that I was able to optimize using mle2. I have two years of the data used to fit the function and I would like to fit both years simultaneously to test if the model parameter estimates differ between years, using likelihood ratio tests and AIC. Can anyone give advice on how to do this? My likelihood functions are long so I'll use the tadpole
2009 Feb 01
2
Extracting Coefficients and Such from mle2 Output
The mle2 function (bbmle library) gives an example something like the following in its help page. How do I access the coefficients, standard errors, etc in the summary of "a"? > x <- 0:10 > y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) > LL <- function(ymax=15, xhalf=6) + -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE)) > a <- mle2(LL,
2012 Jul 30
1
confusion over S3/S4 importing
Can anyone help me figure out the right way to import a method that is defined as S3 in one package and S4 in another? Specifically: profile() is defined as an S3 method in the stats package: function (fitted, ...) UseMethod("profile") <bytecode: 0xa4cd6e8> <environment: namespace:stats> In stats4 it is defined as an S4 method: stats4:::profile standardGeneric for
2012 Feb 01
3
Probit regression with limited parameter space
Dear R helpers, I need to estimate a probit model with box constraints placed on several of the model parameters. I have the following two questions: 1) How are the standard errors calclulated in glm (family=binomial(link="probit")? I ran a typical probit model using the glm probit link and the nlminb function with my own coding of the loglikehood, separately. As nlminb does not
2009 Nov 04
1
compute maximum likelihood estimator for a multinomial function
Hi there I am trying to learn how to compute mle in R for a multinomial negative log likelihood function. I am using for this the book by B. Bolker "Ecological models and data in R", chapter 6: "Likelihood an all that". But he has no example for multinomial functions. What I did is the following: I first defined a function for the negative log likelihood:
2011 Feb 11
2
fitdistr question
Hello, I tried to fit a poisson distribution but looking at the function fitdistr() it does not optimize lambda but simply estimates the mean of the data and returns it as lambda. I'm a bit confused because I was expecting an optimization of this parameter to gain a good fit... If I would use mle() of stats4 package or mle2() of bbmle package, I would have to write the function by myself
2008 Sep 10
1
using function instead of formula in plm
Hi all, I am trying to use plm to estimate coefficients in a model consisting of a system of equations. So far I used mle2 from the package "bbmle", but now I need to test for autocorrelation and mle2 does not provide for the necessary tests. mle2 needs a function as input that might as well consist of many different equations. plm however requires an object of class formula that needs
2008 Nov 19
1
mle2 simple question - sigma?
I'm trying to get started with maximum likelihood estimation with a simple regression equivalent out of Bolker (Ecological Models and Data in R, p302). With this code: #Basic example regression library(bbmle) RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5)) names(RegData)<-c("x", "y") linregfun = function(a,b,sigma) { Y.pred = a+b*x
2012 Apr 18
1
error estimating parameters with mle2
Hi all, When I try to estimate the functional response of the Rogers type I equation (for the mle2 you need the package bbmle): > RogersIbinom <- function(N0,attackR2_B,u_B) {attackR2_B+u_B*N0} > RogersI_B <- mle2(FR~dbinom(size=N0,prob=RogersIbinom(N0,attackR2_B,u_B)/N0),start=list(attackR2_B=4.5,u_B=0.16),method="Nelder-Mead",data=data5) I get following error message
2008 Sep 19
0
panel data analysis possible with mle2 (bbmle)?
Dear R community, I want to estimate coefficients in a (non-linear) system of equations using 'mle2' from the "bbmle" package. Right now the whole data is read in as just one long time series, when it's actually 9 cross sections with 30 observations each. I would like to be able to test and correct for autocorrelation but haven't found a way to do this in this package.
2008 Jul 21
1
Control parameter of the optim( ): parscale
Hi everybody, I am using the L-BFGS-B method of the mle2() function to estimate the values of 6 parameters. mle2 uses the methods implemented in optim. As I got it from the descriptions available online, one can use the parscale parameter to tell R somehow what the values of the estimated parameters should be . . . Could somebody please help me understand what one has to do actually with the
2019 Apr 08
1
debian testing: Problems with R function vignette()
Hola! I am on debian testing, all updates up to date. I am running R via emacs and ess, so I canot know if this is an R or emacs/ess problem. What happens is that I want to read an vignette, and calls something like vignette("mle2", package="bbmle") the pdf file opens (for me in Foxit reader), no problem, but then emacs starts to spew a lot of spam, interfering with the
2012 Apr 19
1
non-numeric argument in mle2
Hi all, I have some problems with the mle2 function > RogersIIbinom <- function(N0,attackR3_B,Th3_B) {N0-lambertW(attackR3_B*Th3_B*N0*exp(-attackR3_B*(24-Th3_B*N0)))/(attackR3_B*Th3_B)} > RogersII_B <- mle2(FR~dbinom(size=N0,prob=RogersIIbinom(N0,attackR3_B,Th3_B)/N0),start=list(attackR3_B=1.5,Th3_B=0.04),method="Nelder-Mead",data=dat) Error in dbinom(x, size, prob, log)
2012 Jan 12
2
Function accepted by optim but not mle2 (?)
Dear Sir/ Madam, I'm having trouble de-bugging the following - which works perfectly well with optim or optimx - but not with mle2. I'd be really grateful if someone could show me what is wrong. Many thanks in advance. JSC: gompertz<- function (x,t=data) { a3<-x[1] b3<-x[2] shift<-data[1] h.t<-a3*exp(b3*(t-shift))
2010 Nov 15
1
comparing levels of aggregation with negative binomial models
Dear R community, I would like to compare the degree of aggregation (or dispersion) of bacteria isolated from plant material. My data are discrete counts from leaf washes. While I do have xy coordinates for each plant, it is aggregation in the sense of the concentration of bacteria in high density patches that I am interested in. My attempt to analyze this was to fit negative binomial
2009 Aug 31
2
interactions and stall or memory shortage
Hello, After putting together interaction code that worked for a single pair of interactions, when I try to evaluate two pairs of interactions( flowers*gopher, flowers*rockiness) my computer runs out of memory, and the larger desktop I use just doesn't go anywhere after about 20 minutes. Is it really that big a calculation? to start: mle2(minuslogl = Lily_sum$seedlings ~ dnbinom(mu = a,
2019 Apr 24
1
Bug in "stats4" package - "confint" method
Dear R developers, I noticed a bug in the stats4 package, specifically in the confint method applied to ?mle? objects. In particular, when some ?fixed? parameters define the log likelihood, these parameters are stored within the mle object but they are not used by the ?confint" method, which retrieves their value from the global environment (whenever they still exist). Sample code: >
2010 Nov 29
2
accuracy of GLM dispersion parameters
I'm confused as to the trustworthiness of the dispersion parameters reported by glm. Any help or advice would be greatly appreciated. Context: I'm interested in using a fitted GLM to make some predictions. Along with the predicted values, I'd also like to have estimates of variance for each of those predictions. For a Gamma-family model, I believe this can be done as Var[y] =
2009 Aug 04
1
parameter asterisks
Hello, Is there a clearcut answer as to why R prints 'NA' sometimes instead of standard errors? mle2(minuslogl = nlikfun4, start = list(a = 1, c = 1, d = 0.2, b = 0.1, b1 = 0.1), method = "Nelder-Mead") Coefficients: Estimate Std. Error z value Pr(z) a 3.83845751 0.47320236 8.1117 4.993e-16 *** c 0.95545367 NA NA NA d -0.22509015 NA NA NA b 0.04260199 0.00743892 5.7269