Description Usage Arguments Value Author(s) See Also Examples
View source: R/27-prepBernoulliTransform.R
Perform a Bernoulli transform on a table of scalar traits of sampled individuals while using a separate table of localities.
1 | hzar.doMorphoSets(traitNames, tDist, tDLocCol, tDDistCol, tValues, tVLocCol)
|
traitNames |
The columns of |
tDist |
A data.frame with a column of locality identifiers and a
column of locality distances. See
|
tDLocCol |
The name of the column of |
tDDistCol |
The name of the column of |
tValues |
A data.frame of observed scalar traits of individuals. See
|
tVLocCol |
The name of the column of |
A list of hzar.obsData
objects. The values of
traitNames
are used as names. The Bernoulli likelihood
function is for each hzar.obsData
object.
Graham Derryberry asterion@alum.mit.edu
manakinLocations
manakinMorphological
hzar.plot.obsData
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | data(manakinMorphological);
data(manakinLocations);
mkn <-
hzar.doMorphoSets("beard.length",
tDist=manakinLocations,
tDLocCol="LocalityID",
tDDistCol="distance",
tValues=manakinMorphological,
tVLocCol="Locality")
print(str(mkn));
hzar.plot.obsData(mkn$beard.length);
mknBLModel <-
hzar.makeCline1DFreq(mkn$beard.length, scaling="fixed",tails="none");
mknBLModel <-
hzar.model.addBoxReq(mknBLModel,-30,600);
## Not run:
mknBLFitR <-
hzar.first.fitRequest.old.ML(model=mknBLModel ,
mkn$beard.length,
verbose=FALSE);
mknBLFit <- hzar.doFit(mknBLFitR)
plot(hzar.mcmc.bindLL(mknBLFit))
mknBLData <-
hzar.dataGroup.add(mknBLFit);
print(hzar.getLLCutParam(mknBLData,c("center","width")));
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.