Displaying 20 results from an estimated 9000 matches similar to: "wrapping mle()"
2007 Jul 29
1
behavior of L-BFGS-B with trivial function triggers bug in stats4::mle
With the exception of "L-BFGS-B", all of the
other optim() methods return the value of the function
when they are given a trivial function (i.e., one with no
variable arguments) to optimize. I don't think this
is a "bug" in L-BFGS-B (more like a response to
an undefined condition), but it leads to a bug in stats4::mle --
a spurious error saying that a better fit
has been
2006 Jun 23
1
How to use mle or similar with integrate?
Hi
I have the following formula (I hope it is clear - if no, I can try to
do better the next time)
h(x, a, b) =
integral(0 to pi/2)
(
(
integral(D/sin(alpha) to Inf)
(
(
f(x, a, b)
)
dx
)
dalpha
)
and I want to do an mle with it.
I know how to use mle() and I also know about integrate(). My problem is
to give the parameter values a and b to the
2007 Dec 06
1
suggested modification to the 'mle' documentation?
Hello:
I wish to again express my appreciation to all who have
contributed to making R what it is today.
At this moment, I'm particularly grateful for whoever modified the
'mle' code so data no longer need be passed via global variables. I
remember struggling with this a couple of years ago, and I only today
discovered that it is no longer the case.
I'd
2004 Sep 13
2
Problem with mle in stats4 (R 1.9.1)
Hi!
This is a repost of an earlier message (with a clearer example
demonstrating the problem I ran into). If you run the mle example in
stats4
library(stats4)
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))
(fit <- mle(ll))
plot(profile(fit),
2007 Aug 13
1
[Fwd: behavior of L-BFGS-B with trivial function triggers bug in stats4::mle]
I sent this in first on 30 July. Now that UseR! is over I'm trying again
(slightly extended version from last time).
With R 2.5.1 or R 2.6.0 (2007-08-04 r42421)
"L-BFGS-B" behaves differently from all of the
other optim() methods, which return the value of the function
when they are given a trivial function (i.e., one with no
variable arguments) to optimize. This is not
a bug in
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,
2006 Jun 02
2
Problem with mle
R 2.3.0
Linux, SuSE 10.0
Hi
I have two problems with mle - probably I am using it the wrong way so
please let me know.
I want to fit different distributions to an observed count of seeds and
in the next step use AIC or BIC to identify the best distribution.
But when I run the script below (which is part of my original script), I
get one error message for the first call of mle:
Error in
2008 May 08
3
MLE for noncentral t distribution
I have a data with 236 observations. After plotting the histogram, I found that it looks like non-central t distribution. I would like to get MLE for mu and df.
I found an example to find MLE for gamma distribution from "fitting distributions with R":
library(stats4) ## loading package stats4
ll<-function(lambda,alfa) {n<-200
x<-x.gam
2008 Oct 09
2
Help MLE
Dear,
I'm starting on R language. I would like some help to implement a MLE
function.
I wish to obtain the variables values (alpha12, w_g12, w_u12) that maximize
the function LL = Y*ln(alpha12 + g*w_g12 + u*w_u12).
Following the code:
rm(list=ls())
ls()
library(stats4)
Model = function(alpha12,w_g12,w_u12)
{
Y = 1
u = 0.5
g = -1
Y*log(alpha12 + g*w_g12 + u*w_u12)
}
res =
2007 Sep 10
1
MLE Function
I am just trying to teach myself how to use the mle function in R because it is much better than what is provided in MATLAB. I am following tutorial material from the internet, however, it gives the following errors, does anybody know what is happening to cause such errors, or does anybody know any better tutorial material on this particular subject.
>
2012 Jul 05
3
Maximum Likelihood Estimation Poisson distribution mle {stats4}
Hi everyone!
I am using the mle {stats4} to estimate the parameters of distributions by
MLE method. I have a problem with the examples they provided with the
mle{stats4} html files. Please check the example and my question below!
*Here is the mle html help file *
http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
2006 Jun 05
2
Calculation of AIC BIC from mle
R 2.3.0, all packages up to date
Linux, SuSE 10.0
Hi
I want to calculate AIC or BIC from several results from mle calculation.
I found the AIC function, but it does not seem to work with objects of
class mle -
If I execute the following:
ml1 <- mle(...)
AIC(ml1)
I get the following error messale:
Error in logLik(object) : no applicable method for "logLik"
Therefore I am using the
2007 Sep 11
1
Fitting Data to a Noncentral Chi-Squared Distribution using MLE
Hi, I have written out the log-likelihood function to fit some data I have (called ONES20) to the non-central chi-squared distribution.
>library(stats4)
>ll<-function(lambda,k){x<-ONES20; 25573*0.5*lambda-25573*log(2)-sum(-x/2)-log((x/lambda)^(0.25*k-0.5))-log(besselI(sqrt(lambda*x),0.5*k-1,expon.scaled=FALSE))}
> est<-mle(minuslog=ll,start=list(lambda=0.05,k=0.006))
2011 Feb 07
2
question mle again
A few day ago, I was looking for an answer to my question but didn't
get one. Anybody who can help now?
Hello,
I tried to use mle to fit a distribution(zero-inflated negbin for
count data). My call is very simple:
mle(ll)
ll() takes the three parameters, I'd like to be estimated (size, mu
and prob). But within the ll() function I have to judge if the current
parameter-set gives a nice
2003 Jul 24
5
inverse prediction and Poisson regression
Hello to all, I'm a biologist trying to tackle a "fish" (Poisson Regression) which is just too big for my modest understanding of stats!!!
Here goes...
I want to find good literature or proper mathematical procedure to calculate a confidence interval for an inverse prediction of a Poisson regression using R.
I'm currently trying to analyse a "dose-response"
2005 Sep 06
2
(no subject)
my problem actually arised with fitting the data to the weibulldistribution,
where it is hard to see, if the proposed parameterestimates make sense.
data1:2743;4678;21427;6194;10286;1505;12811;2161;6853;2625;14542;694;11491;
?? ?? ?? ?? ?? 14924;28640;17097;2136;5308;3477;91301;11488;3860;64114;14334
how am I supposed to know what starting values i have to take?
i get different
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi,
There is something I don't get with object of class "mle" returned by a
function I wrote. More precisely it's about the behaviour of method
"confint" and "profile" applied to these object.
I've written a short function (see below) whose arguments are:
1) A univariate sample (arising from a gamma, log-normal or whatever).
2) A character string
2005 Sep 06
2
fitting distributions with R
Dear all
I've got the dataset
data:2743;4678;21427;6194;10286;1505;12811;2161;6853;2625;14542;694;11491;
?? ?? ?? ?? ?? 14924;28640;17097;2136;5308;3477;91301;11488;3860;64114;14334
I know from other testing that it should be possible to fit the data with the
exponentialdistribution. I tried to get parameterestimates for the
exponentialdistribution with R, but as the values
of the parameter
2018 May 28
2
to R Core T: mle function in 32bits not respecting the constrain
I have an issue using mle in versions of 32 bits.
I am writing a package which I want to submit to the CRAN.
When doing the check, there is an example that has an error running in the
32 bits version.
The problem comes from the mle function, using it with a lower constrain.
In 64 bits version it works fine but when I put it in the R 32 bits it
fails. (same numbers, all equal!)
The call is:
2008 Mar 11
1
messages from mle function
Dears useRs,
I am using the mle function but this gives me the follow erros that I
don't understand. Perhaps there is someone that can help me.
thank you for you atention.
Bernardo.
> erizo <- read.csv("Datos_Stokes_1.csv", header = TRUE)
> head(erizo)
EDAD TALLA
1 0 7.7
2 1 14.5
3 1 16.9
4 1 13.2
5 1 24.4
6 1 22.5
> TAN <-