This function does not maximise the likelihood function but rather provide a range of log-likelihood values as a function of effective population size.

1 | ```
NB.plot.likelihood(infile, alleles, sample.interval, lb, ub, step, plotit = TRUE)
``` |

`infile` |
The input data. Please refer to |

`alleles` |
Number of alleles at each locus. Please refer to |

`sample.interval` |
Please refer to |

`lb` |
The lower bound of N. |

`ub` |
The upper bound of N. |

`step` |
How many points do you want to evaluate at. |

`plotit` |
Do you want to plot the log-likelihood out? |

The input arguments `infile`

, `alleles`

, and `sample.interval`

have the same definitions as those in `NB.estimator`

.

Returns a range of log-likelihood values with the associated effective population size. If `plotit==TRUE`

then a plot of the log-likelihood will also be produced.

This would be a good way to examine whether the maximization converges to the global maximum.

`NB.estimator. `

1 2 3 4 5 6 | ```
## CREATE SAMPLE DATASET
NB.example.dataset()
## PLOT THE LOG-LIKELIHOOD
NB.plot.likelihood(infile='sample_data.txt', alleles=rep(4, 50),
sample.interval=c(0, 8), lb=300, ub=2000, step=200)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.