hzar.makeCline1DFreq: Make a cline model with the requested attributes.

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

View source: R/20-hzarPrep.R

Description

Constructs a clineMetaModel object for use with hzar.first.fitRequest.old.ML. Said object can be further tailored to the specific model desired, or can be used as-is.

Usage

1
2
3
4
5
hzar.makeCline1DFreq(data = NULL, scaling = "none", tails = "none",
  direction = NULL) 
hzar.makeCline1DCLT(data = NULL, scaling = "free", tails = "none",
  direction = NULL)
hzar.makeCline1DNormal(data, tails = "none")

Arguments

data

A hzar.obsData object, used to determine cline direction and estimate initial values.

scaling

Can be one of three strings:

  • "none"A model with fixed minimum value 0 and maximum value 1 is desired.

  • "fixed"A model with minimum and maximum values fixed to the minimum and maxumimum observed mean values of data is desired.

  • "free"A model with the minimum and maximum value as free parameters is desired.

tails

Can be one of five strings:

  • "none"A model with no exponential tails is desired

  • "right"A model with just one exponential tail on the right is desired.

  • "left"A model with just one exponential tail on the left is desired.

  • "mirror"A model with two exponential tails mirrored about the cline center is desired.

  • "both"A model with two tails with independent parameters is desired.

direction

Can be one of three values:

  • NULLDetermine direction using data

  • "ascending"A model whose estimates increase as the site distance increases is desired.

  • "descending"A model whose estimates decrease as the site distance increases is desired.

Details

The clineMetaModel object returned by hzar.makeCline1DNormal has a slightly diffent structure, due to the complexity of the normal cline model. Use hzar.first.fitRequest.gC instead of hzar.first.fitRequest.old.ML to construct the hzar.fitRequest object needed for hzar.doFit.

Value

A clineMetaModel object, which is a list with the following 4 components:

req

A boolean function of the model parameters w

prior

Description of 'comp1'

func

Description of 'comp1'

parameterTypes

A list of clineParameter objects, named with the parameter names. A clineParameter object structure:

  • Components:

  • valThe initial or fixed value.

  • wThe parameter tuning.

  • Attributes:

  • "param"The parameter name.

  • "fixed"TRUE if the parameter is fixed.

  • "limit.lower"The parameter minimum finite value.

  • "limit.upper"The parameter maximum finite value.

  • "realBTWN01"The parameter is restricted to between 0 and 1.

Author(s)

Graham Derryberry [email protected]

References

Gay, L., P.-A. Crochet, D. A. Bell, and T. Lenormand. 2008. Comparing clines on molecular and phenotypic traits in hybrid zones: a window on tension zone models. Evolution 62:2789-2806.

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

hzar.obsData hzar.first.fitRequest.old.ML hzar.first.fitRequest.gC

Examples

1
2
3
4
5
6
7
8
data(manakinMolecular);
mknAdaA <-
  hzar.doMolecularData1DPops(manakinMolecular$distance,
                             manakinMolecular$ada.A,
                             manakinMolecular$ada.nSamples);
mknAdaAmodel <-
  hzar.makeCline1DFreq(mknAdaA, scaling="fixed",tails="none");
str(mknAdaAmodel);

hzar documentation built on May 29, 2017, 8:45 p.m.