Hi everybody, I'm interested in evaluating the effect of a continuous variable on the mean and/or the variance of my response variable. I have built functions expliciting these and used the 'mle2' function to estimate the coefficients, as follows:
func.1 <- function(m=62.9, c0=8.84, c1=-1.6) { s <- c0+c1*(x) -sum(dnorm(y, mean=m, sd=s,log=T)) } m1 <- mle2(func.1, method="SANN") However, the estimation of the effect of x on the variance of y usually has dealt some troubles, resulting in no convergencies or sd of estimates extremely huge. I tried using different optimizers, but I still faced the some problems. When I had similar troubles in 'GLMM' statistical universe, I used bayesian functions to solve this problem, enjoyning the flexibility of different start points to reach the maximum likelihood estimates. However, I have no idea which package or which function to use to solve the specific problem I'm facing now. Does anyone have a clue? Thanks in advance Gustavo Requena PhD Student - Laboratory of Arthropod Behavior and Evolution Universidade de Sao Paulo - Brazil -- View this message in context: http://r.789695.n4.nabble.com/Bayesian-functions-for-mle2-object-tp3776442p3776442.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.