Re: [R] non-numeric argument in mle2

2012-04-19 Thread Ben Bolker
peter dalgaard gmail.com> writes: > > > On Apr 19, 2012, at 09:52 , Joachim Audenaert wrote: > > > 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)))/ >

Re: [R] non-numeric argument in mle2

2012-04-19 Thread peter dalgaard
On Apr 19, 2012, at 09:52 , Joachim Audenaert wrote: > 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=N

[R] non-numeric argument in mle2

2012-04-19 Thread Joachim Audenaert
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