llik.pc {epimdr2} | R Documentation |
Function to estimate parameters for the piecewise-constant catalytic model
Description
This function uses binomial likelihoods to estimate the picewise-constant FoI model from age-incidence data
Usage
llik.pc(par, age, num, denom, up)
Arguments
par |
a vector with initial guesses |
age |
a vector with the ages |
num |
a vector with number infected by age |
denom |
a vector with number tested by age |
up |
a vector with upper age-bracket cut-offs |
Value
The negative log-likelihood for a candidate piecewise constant catalytic model
Examples
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)
[Package epimdr2 version 1.0-9 Index]