Learn R Programming

hzar (version 0.2-5)

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

Description

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

Usage

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

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.

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.

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.

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

Run this code
data(manakinMolecular);
mknAdaA <-
  hzar.doMolecularData1DPops(manakinMolecular$distance,
                             manakinMolecular$ada.A,
                             manakinMolecular$ada.nSamples);
print(str(mknAdaA));
hzar.plot.obsData(mknAdaA);

Run the code above in your browser using DataLab