hzar.doMolecularData1DPops: Generate a hzar.obsData object using summary data about each...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/20-hzarPrep.R

Description

Creates a hzar.obsData object using the observations given. The likelihood function used is chosen based on the method called.

Usage

1
2
3
4
5
6
7
hzar.doMolecularData1DPops(distance, pObs, nEff,
                           siteID=paste("P",1:length(distance),sep=""),
                           ylim=extendrange(c(0,1)))
hzar.doCLTData1DPops(distance, muObs, varObs, nEff)
hzar.doNormalData1DPops(distance, muObs, varObs, nEff,
                        siteID=paste("P",1:length(distance),sep=""),
                        ylim=NULL)

Arguments

All arguments should be of the same length.

distance

The distance of each locality. If the same distance is given multiple times, then multiple localities are assumed to be at that distance.

pObs

The observed frequency at each locality.

nEff

The effective number of samples observed at each locality.

muObs

The mean trait value observed at each site.

varObs

The trait variance observed at each site.

ylim

The ylim to use when plotting the observed data.

siteID

The identifier to use for each sampling site.

Details

For hzar.doCLTData1DPops, varObs must not be less than zero, and should be greater than zero. If equal to zero, the method will attempt to estimate the number of significant digits in the observed trait value, and use that to calculate additional variance due to measurement error at each site, and add that variance to the observed variance for each site.

Value

A hzar.obsData object with the following structure.

frame

A data.frame composed of the arguments.

model.LL

A function of one argument that returns a log likelihood. The argument is a function of distance that estimates either frequency or trait value as appropriate.

Author(s)

Graham Derryberry asterion@alum.mit.edu

References

Szymura, J., and N. H. Barton. 1986. Genetic analysis of a hybrid zone between the fire-bellied toads, Bombina bombina and B. variegata, near Cracow in souhern Poland. Evolution 40:1141-1159.

Szymura, J., and N. H. Barton. 1991. The genetic structure of the hybrid zone between the fire-bellied toads Bombina bombina and B. variegata: comparisons between transects and between loci. Evolution 45:237-261.

See Also

manakinMolecular hzar.plot.obsData

Examples

1
2
3
4
5
6
7

Example output

Loading required package: MCMCpack
Loading required package: coda
Loading required package: MASS
##
## Markov Chain Monte Carlo Package (MCMCpack)
## Copyright (C) 2003-2021 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
##
## Support provided by the U.S. National Science Foundation
## (Grants SES-0350646 and SES-0350613)
##
Loading required package: foreach
List of 3
 $ frame   :'data.frame':	11 obs. of  3 variables:
  ..$ dist   : num [1:11] 0 138 152 160 182 ...
  ..$ obsFreq: num [1:11] 0.1 0.357 0.2 0.45 0.31 0.545 0.568 0.442 0.625 0.425 ...
  ..$ n      : int [1:11] 10 14 40 40 42 22 44 52 40 40 ...
 $ ylim    : num [1:2] -0.05 1.05
 $ model.LL:function (model.func)  
 - attr(*, "class")= chr [1:2] "clineSampleData1D" "hzar.obsData"
NULL

hzar documentation built on May 2, 2019, 7 a.m.