search for: xhalf

Displaying 8 results from an estimated 8 matches for "xhalf".

Did you mean: half
2007 Jul 29
1
behavior of L-BFGS-B with trivial function triggers bug in stats4::mle
...meric(0),0,0) or something along those lines. Or one could change L-BFGS-B to behave the same as the other methods. cheers Ben Bolker --------------------- library(stats4) ## using example from ?mle 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)) ## fix one parameter to get 1D profile fit2 <- mle(ll, fixed=list(xhalf=6)) profile(fit2) ## same again with method="L-BFGS-B" fit3 <- mle(ll, fixed=list(xhalf=6),method="L-BFGS-B") profile(fit3) ll0 <- fu...
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, fixed=list(xhalf=6)) > summary(a) Maximum likelihood estimation Call: mle2(minuslogl = LL, fixed = list(xhalf = 6)) Coefficients: Estimate Std. Error z value Pr(z) ymax 19.2881 1.7115 11.26...
2007 Dec 06
1
suggested modification to the 'mle' documentation?
...this fact, e.g., by adding one of the two examples appearing below. Best Wishes, Spencer Graves ################################ x <- 0:10 y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) # Pass data via function arguments rather than global variables ll.5 <- function(ymax=15, xhalf=6, x., y.) -sum(stats::dpois(y., lambda=ymax/(1+x./xhalf), log=TRUE)) (fit.5 <- mle(ll.5, start=list(ymax=15, xhalf=6), fixed=list(x.=x, y.=y))) ll3 <- function(lymax=log(15), lxhalf=log(6), x., y.) -sum(stats::dpois(y., lambda=exp(lymax)/(1+x./exp(lxhalf)),...
2007 Aug 13
1
[Fwd: behavior of L-BFGS-B with trivial function triggers bug in stats4::mle]
...as the other methods. If I don't hear anything in a few days would it be appropriate to submit this as a bug report? cheers Ben Bolker --------------------- library(stats4) ## using example from ?mle 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)) ## fix one parameter to get 1D profile fit2 <- mle(ll, fixed=list(xhalf=6)) profile(fit2) ## same again with method="L-BFGS-B" fit3 <- mle(ll, fixed=list(xhalf=6),method="L-BFGS-B") profile(fit3) ## BUG ll0 &...
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
2006 Dec 30
3
wrapping mle()
Hi, How can we set the environment for the minuslog function in mle()? The call in this code fails because the "ll" function cannot find the object 'y'. Modifying from the example in ?mle: library(stats4) ll <- function(ymax=15, xhalf=6) { -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE)) } fit.mle <- function(FUN, x, y) { loglik.fun <- match.fun(FUN) mle(loglik.fun, method="L-BFGS-B", lower=c(0, 0)) } fit.mle("ll", x=0:10, y=c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)) How should &quot...
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), absVal=FALSE) everything works fine. Now run (fit <- mle(ll, method="BFGS", control=list(ndeps=c(1e-3, 1e-3)))) plot(profile(fit), absVal=FALSE) and you w...
2013 Jan 23
3
Pasting a list of parameters into a function
I need to repeat a function many times, with differing parameters held constant across iterations. To accomplish this, I would like to create a list (or vector) of parameters, and then insert that list into the function. For example: q<-("l,a,b,s") genericfunction<-function(q){ } ###### The equivalent code would of course be genericfunction<-function(l,a,b,s){ } Any help