Learn R Programming

phyreg (version 0.7)

Example datasets: Example data

Description

These datasets are supplied to allow examples to run in the phyreg help page. They all correspond to a hypothetical set of 100 species, with the same phylogeny and branch lengths.

Usage

data(myd0) data(myd1) data(myd2) data(myd3) data(extax) data(newickstr) data(exphylo)

Arguments

Format

myd0 to myd3 are datasets with 100 observations on the following 7 variables.
error
drawn from a standard Normal distribution for each species, but appropriately covarying across species.
X1-X3
continuous variables, each individually standard Normal, but appropriately covarying across species.
A, B
factors with four levels 1 to 4
y
the 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. exphylo is a phylo object containing the same phylogeny as represented by extax. See Description for explanation of the heights. Note that a singleton higher node (only one daughter node) present in newickstr is retained in exphylo.

Details

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 an lm() (never possible in life, of course) you can obtain the coefficients and root mean square error used to construct the data. (phyreg will fail with no residual error, but without error the estimates are the same.) 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.

See Also

The data is useful in calls to phyreg, with arguments specified as data=myd0 etc and taxmatrix=extax. newickstr and exphylo are useful in calls to phyfromnewick and phyfromphylo.

Examples

Run this code
data(myd0, myd1, myd2, myd3, extax, newickstr, exphylo)

Run the code above in your browser using DataLab