powered by
This function uses binomial likelihoods to estimate the picewise-constant FoI model from age-incidence data
llik.pc(par, age, num, denom, up)
a vector with initial guesses
a vector with the ages
a vector with number infected by age
a vector with number tested by age
a vector with upper age-bracket cut-offs
The negative log-likelihood for a candidate piecewise constant catalytic model
# NOT RUN { x=c(1,4,8,12,18,24) para=rep(.1,length(x)) # } # NOT RUN { optim(par=log(para),fn=loglikpc, age=rabbit$a, num=rabbit$inf, denom=rabbit$n, up=x) # }
Run the code above in your browser using DataLab