similar to: using mle2 for multinomial model optimization

Displaying 20 results from an estimated 1100 matches similar to: "using mle2 for multinomial model optimization"

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 Mar 24
0
optimize a joint lieklihood with mle2
Hi I'm trying to maximize a joint likelihood of 2 likelihoods (Likelihood 1 and Likelihood 2) in mle2, where the parameters I estimate in Likelihood 2 go into the likelihood 1. In Likelihood 1 I estimate the vector logN with length 37, and for the Likelihood 2 I measure a vector s of length 8. The values of s in Lieklihood 2 are used in the Likelihood 1. I have 2 questions: ##1 I manage
2023 Dec 19
1
[External] Re: zapsmall(x) for scalar x
>>>>> Steve Martin >>>>> on Mon, 18 Dec 2023 07:56:46 -0500 writes: > Does mFUN() really need to be a function of x and the NA values of x? I > can't think of a case where it would be used on anything but the non-NA > values of x. > I think it would be easier to specify a different mFUN() (and document this > new argument)
2011 Apr 12
1
2-parameter MLE problems
Hi all, Sorry for the re-post, I sent my previous e-mail before it was complete. I am trying to model seroprevalence using the differential equation: dP/dt = beta*seronegative*.001*(seropositive)-0.35*(0.999)*(seropositive)-r*seropositive. I would like to estimate my two parameters, beta and r, using maximum likelihood methods. I have included my code below:
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
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
Does mFUN() really need to be a function of x and the NA values of x? I can't think of a case where it would be used on anything but the non-NA values of x. I think it would be easier to specify a different mFUN() (and document this new argument) if the function has one argument and is applied to the non-NA values of x. zapsmall <- function(x, digits = getOption("digits"),
2010 Aug 14
1
Help with graphing impulse response functions
Dear colleagues/contributors, I'd be pleased if someone could provide insights on how to plot impulse response functions in a format that can easily be copied in a word document just as plotting time-series of variables. I had followed the outline suggested by Benhard Pfaff [see http://127.0.0.1:17693/library/vars/html/irf.html] but I am unable to get the impulse response functions in a
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,
2004 Oct 16
1
0.184 -- gcc: warning: `-x c' after last input file has no effect
What do I need to do to fix this? [jonsmirl@smirl klibc-0.184]$ make make[1]: Entering directory `/home/dri/klibc-0.184/klibc' gcc -Wp,-MT,syscalls.nrs,-MD,./.syscalls.nrs.d -mregparm=3 -DREGPARM=3 -march=i386 -Os -g -falign-functions=0 -falign-jumps=0 -falign-loops=0 -nostdinc -iwithprefix include -D__KLIBC__ -DBITSIZE=32 -I../include/arch/i386 -I../include/bits32 -I../include
2020 Nov 16
2
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
On Mon, Nov 16, 2020 at 2:12 PM David Blaikie <dblaikie at gmail.com> wrote: > On Mon, Nov 16, 2020 at 1:55 PM Mehdi AMINI <joker.eph at gmail.com> wrote: > > On Mon, Nov 16, 2020 at 12:55 PM David Blaikie <dblaikie at gmail.com> > wrote: > >> > >> I will say I'm not a huge fan of adding even more names for things in > >> this fairly
2020 Nov 17
1
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
On Mon, Nov 16, 2020 at 6:14 PM Sean Silva <chisophugis at gmail.com> wrote: > > > On Mon, Nov 16, 2020 at 4:48 PM Mehdi AMINI <joker.eph at gmail.com> wrote: > >> >> >> On Mon, Nov 16, 2020 at 4:10 PM David Blaikie <dblaikie at gmail.com> wrote: >> >>> On Mon, Nov 16, 2020 at 2:44 PM Mehdi AMINI <joker.eph at gmail.com> wrote:
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
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
[posted to R-devel, no discussion: resubmitting it as a bug, just so it gets logged appropriately] Sorry to report further difficulties with nls and profiling and constraints ... the problem this time (which I didn't check for in my last round of testing) is that the nls profiler doesn't seem to respect constraints that have been set when using the port algorithm. See test code
2020 Nov 17
2
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
On Mon, Nov 16, 2020 at 4:10 PM David Blaikie <dblaikie at gmail.com> wrote: > On Mon, Nov 16, 2020 at 2:44 PM Mehdi AMINI <joker.eph at gmail.com> wrote: > > > > > > > > On Mon, Nov 16, 2020 at 2:12 PM David Blaikie <dblaikie at gmail.com> > wrote: > >> > >> On Mon, Nov 16, 2020 at 1:55 PM Mehdi AMINI <joker.eph at
2020 Nov 16
2
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
On Mon, Nov 16, 2020 at 12:55 PM David Blaikie <dblaikie at gmail.com> wrote: > I will say I'm not a huge fan of adding even more names for things in > this fairly core/common use case (now we'll have even more vector > names to pick from) - can we use default template arguments so we can > write SmallVector<T> instead of SmallVector<T, N> and would that >
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:
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
2010 Feb 01
1
Help with multiple poisson regression with MLE2
Hi, I'm trying to make multiple poisson regressions with the MLE2 command. I have used the following expression, but I receive an error message: poisfit <- mle2(y ~ dpois(exp(b0 + b1*x1 + b2*x2)), start=list(b0=1, b1=1, b2=1), data=data1) Error in optim(par = c(1, 1, 1), fn = function (p) : non-finite initial value 'vmmin' I have changed initial values using coefficient values
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
2010 Oct 17
6
klibc 1.5.20 falls into an finite loop during build against linux 2.6.35.4
GEN usr/klibc/syscalls/SYSCALLS.i GEN usr/klibc/syscalls/syscalls.nrs GEN usr/klibc/syscalls/typesize.c KLIBCCC usr/klibc/syscalls/typesize.o OBJCOPY usr/klibc/syscalls/typesize.bin GEN usr/klibc/syscalls/syscalls.mk GEN usr/klibc/syscalls/SYSCALLS.i GEN usr/klibc/syscalls/syscalls.nrs GEN usr/klibc/syscalls/typesize.c KLIBCCC