# R: Function to estimate parameters for the picewise-constant...

llik.pc {epimdr} | R Documentation

## Function to estimate parameters for the picewise-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-likelihhod 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 epimdr version 0.6-4 Index]