Description Usage Format Details See Also Examples
Datasets myd0 to myd3 are data frames that contain a y-variable, three continuous x-variables X1 to X3, and two factors A and B. They were simulated by a phylogenetic method, and also contain the error. The phylogeny was created from the taxonomic variables in extax – the heights of the levels were assumed to be 0 for species, 1,2,3 for the three taxonomic variables, and 4 for the root.
1 2 3 4 5 6 |
myd0 to myd3 are datasets with 100 observations on the following 7 variables.
errordrawn from a standard Normal distribution for each species, but of course correlated appropriately for the phylogeny
X1-X3continuous variables
A, Bfactors with four levels 1 to 4
ythe response variable.
extax is a data frame containing three taxonomic variables describing a phylogeny for 100 species
newickstr is a character variable containing the same phylogeny as represented by extax, but in newick format – see Description for explanation of the heights.
The formula calculating y from the independent variables was the same in each dataset, but the independent variables and the error were resampled for each dataset. The mean square error increases from myd0 to myd3. By including "error" in the model (never possible in life, of course) you can obtain the coefficients and root mean square error used to construct the data. The categorical characters are evolved on the tree by taking a transition matrix (tm) to represent the transition probabilities after one unit of time, taking the matrix logarithm (ltm<-logm(tm)), and using the transition matrix expm(bl * ltm) for a branch length of duration bl. (Note that expm() and especially logm() are available in the package expm.)
For examples of use, see phyreg.
The data is useful in calls to phyreg, with arguments specified as data=myd0 etc and taxmatrix=extax. newickstr is useful in calls to phyfromnewick.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.