llik.pc: Function to estimate parameters for the picewise-constant...

Description Usage Arguments Value Examples

View source: R/rfuncs.R

Description

This function uses binomial likelihoods to estimate the picewise-constant FoI model from age-incidence data

Usage

1
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

1
2
3
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)

epimdr documentation built on March 26, 2020, 7:41 p.m.

Related to llik.pc in epimdr...