MLE.popsize {MasterBayes} | R Documentation

## Maximum Likelihood Estimation of the Unsampled Population Size

### Description

Finds the MLE for the number of unsampled males and/or females following Nielsen et al. (2001). The size of the unsampled population can vary over time and space, and genotyping error is accomodated using the CERVUS model of genotyping error (Kalinwoski et al. 2006).

### Usage

    MLE.popsize(X.list, USdam=FALSE, USsire=FALSE, nUS=NULL,
       ped=NULL, ...)

### Arguments

`X.list` | list of design matrices for each offspring derived using `getXlist`
`USdam` | logical or character; if `TRUE` a single undiferentiated population of unsampled females exists. If `USdam` is a character vector it must have the same length as `id` with factor levels representing sub-populations (in time or space) over which the number of unsampled females vary.
`USsire` | logical or character; if `TRUE` a single undiferentiated population of unsampled males exists. if `USsire` is a character vector it must have the same length as `id` with factor levels representing sub-populations (in time or space) over which the number of unsampled males vary.
`nUS` | optional starting vector for the size of the unsampled population. Parmeters for the unsampled female population come before the male population.
`ped` | optional pedigree with id, dam and sire in ech column
`...` | further arguments to be passed

### Value

`nUS` | vector of MLE's for the size of the unsampled population. Lower bound is 1e-5 for numerical stability.
`C` | large sample variance-covariance matrix of `nUS` MLE's

### Note

Nielsen's original model does not account for genotyping error, and estimation of the unsampled population size is VERY sensitive to the level of genotyping error. This function implements a commonly used approxiamtion for genotyping error that ignores pedigree information. For many problems this approximation seems valid, but appears to break down when estimating the size of the unsampled population size. Bayesian estimation of the unsampled population size (see `MCMCped`) that uses an exact solution for genotyping error is more robust.

### Author(s)

Jarrod Hadfield j.hadfield@sheffield.ac.uk

### References

Nielsen. R. et.al Genetics (2001) 157 4 1673-1682

### See Also

`MCMCped`, `popsize.loglik`

### Examples

    data(WarblerP)
    data(WarblerG)

    GdP<-GdataPed(WarblerG)
    res1<-expression(varPed("offspring", restrict=0))

    PdP<-PdataPed(formula=list(res1), data=WarblerP, USsire=TRUE, USdam=TRUE)

    X.list<-getXlist(PdP=PdP, GdP=GdP, E2=0.02)

    nUS<-MLE.popsize(X.list, USsire=TRUE, USdam=TRUE)
    nUS

[Package MasterBayes version 2.0 Index]