Displaying 20 results from an estimated 1000 matches similar to: "peering inside functions in a package?"
2006 May 10
1
ape comparative analysis query
I've been comparing variables among objects (taxa) related by known
trees, using phylogentically independent contrasts in the ape package,
and want to move on to more complex models e.g. by using gls with
appropriate correlation terms. My trees contain lots of (hard)
polytomies and information about ancestors, which I've been including-
creating fully dichotomous trees by using zero branch
2010 Apr 14
1
creating a new corClass for lme()
Hi,
I have been using the function lme() of the package nlme to model grouped
data that is auto-correlated in time and in space (the data was collected on
different days via a moving monitor). I am aware that I can use the
correlation classes corCAR1 and corExp (among other options) to model the
temporal and spatial components of the auto-correlation. However, as far as
I can tell, I can only
2006 Feb 06
1
question about corStruct
dear list,
I am wondering if one can find examples and/or more detailed
descriptions of modifications needed when going beyond standard
corStruct classes (i.e. those already provided for use in lme/nlme)?
When I looked at pages 238-239 of Pinheiro/Bates (2000): Mixed-effects
models in S and S-plus, I found that I would need a bit more explicit
guidance what to do for implementing a new
2006 Nov 20
1
My own correlation structure with nlme
Dear all,
I am trying to define my own corStruct which is different from the
classical one available in nlme. The structure of this correlation is
given below.
I am wondering to know how to continue with this structure by using
specific functions (corMatrix, getCovariate, Initialize,...) in order to
get a structure like corAR1, corSymm which will be working for my data.
Thanks in advance.
2007 Oct 10
2
corMatrix crashes with corARMA structure (PR#9952)
Full_Name: Benjamin Tyner
Version: 2.6.0 RC 2007-10-01 r43043
OS: WinXP
Submission from: (NULL) (171.161.224.10)
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status RC
major
2005 Mar 22
2
LME correlation structures: user defined
Let me modify my question about user-defined covariance structures for LME models: Can somebody tell me how I can see the code for the definition of the correlation structures that come with the NLME package. Specifically I like to see the code for the functions coef, corMatrix, and intialize for any of the pre-defined correlation structures, and use this as a template to define a new correlation
2013 Jun 03
1
Mixed effects model with a phylogenetic tree/ distance matrix as a random effect
Hi,
I'm trying to build a mixed-effects model in which I'd like to include
either a distance matrix or a phylogenetic tree as a random effect.
The troubles I've had are that:
1. Function lmer() in package lme4 only accepts a data frame column as a
random factor and not a distance matrix.
2. Function MCMCglmm() in package MCMCglmm only accepts a rooted and
ultrametric phylogenetic
2010 Jun 17
1
plotting radial dendrograms
Dear list,
I am trying to plot a radial dendrogram using the ape package, which
requires my data to be of class 'phylo'. Currently I have my
dendrogram stored as an object of class 'dendrogram' which was
produced from an outside bit of C code, but was made into an object of
class 'igraph.eigenc' and converted to a dendrogram using
'as.dendrogram()' from the igraph
2009 Sep 17
1
How to colour the tip labels in a phylogenetic tree
Hi,
Using Ape, I have constructed an object of class "phylo", using the
method 'nj' (lets call the object 'tree_ja').
I also have a given subset of 'tree_ja' in a vector (lets call the
vector 'subspecies').
What I want to do, is construct a nj tree - plot(tree_ja) - but have the
species in vector 'subspecies' shown as red at the tips of the
2012 Oct 01
6
nlme: spatial autocorrelation on a sphere
I have spatial data on a sphere (the Earth) for which I would like to run an gls model assuming that the errors are autcorrelated, i.e. including a corSpatial correlation in the model specification.
In this case the distance metric should be calculated on the sphere, therefore metric = "euclidean" in (for example) corSpher would be incorrect.
I would be grateful for help on how to
2010 Jun 02
1
compute the associate vector of distances between leaves in a binary non-rooted tree
Hello.
I'd like to compute the associate vector of distances between leaves in a binary non-rooted tree. The definition of a distance between two leaves in a binary non-rooted tree is the number of edges in the path joining the two leaves.
I've tried the ape package but I'm unable to find this vector.
For example, using rtree(5,rooted=F) I've obtained the following tree:
$edge
2006 Oct 17
2
plotting text with very small negative rotation hangs (PR#9301)
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig308510A16A445880F353C5C9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
to trigger the bug:
plot(0:1,0:1)
text(0.5,0.5,"abc",srt=3D-1e-9)
this doesn't happen for positive, small srt,
or for negative srt with magnitude greater
than about 1e-8 (the example in
2003 Jul 13
1
bootstrap for hclust
dear group members,
I am looking for a function that assess the stability of cluster. The result of hclust function is an hclust object which can be plot as a dendrogram. However to have confidence in the tree topology usualy bootstap is applied. I understand that I can apply bootstarp on the original data and then run hclust(dist() ) as much as I resampled but how to comapre the topologies the I
2013 Jan 18
1
Hclust tree to Figtree w/ branch lengths
Hi,
I'm doing hierarchical clustering, and want to export my dendrogram to a
tree-viewing/editing software. I can do this by converting the data to
Newick format (hc2Newick in ctc package), but I can't get branch lengths to
show in the resulting phylogram. I figured it might help to convert my
hclust object into a phylo object (as.phylo in ape package), but the
following lines give me
2008 Sep 04
1
Binary Tree Testing in "ape" package (a bug?)
Dear all,
I was testing the wonderful package APE.
However upon testing a particular Newick's format
tree - which I think to be a non-binary tree -
it yields different result as expected.
> library(ape)
> tree.hiv <- read.tree(text="(rat,mouse,(human,chimp));")
> is.binary.tree(tree.hiv)
[1] TRUE
Was that a bug in APE package?
- Gundala Viswanath
Jakarta - Indonesia
2009 May 11
1
Using ACE in the ape package
Having a problem running the ace command in ape.
After reading my table into R and then putting the names of the rows in the
table in same order as the tree I can't get ace to run and get the message
Erreur dans as.matrix(x) :
dims [produit 25] ne correspond pas ? la longueur de l'objet [0]
This is the command I am using and each of the vectors used in the
snalysis.
2006 May 09
1
problem accessing trees after read.nexus from ape package
Hello,
I've been trying to figure out how to access the individual elements
from an object of class phylo.
I am reading in 201 trees created by paup as below.
> read.nexus("A_30knj_200t.txt", tree.names= NULL) -> anj30
> anj30[1]
$tree1
$edge
[,1] [,2]
[1,] "-1" "-2"
[2,] "-2" "-3"
[3,] "-3" "1"
2010 Dec 27
1
Any functions to manipulate (merge, cut, remove) hclust objects? (maybe through phylo?)
Hello all,
I'm now working with hclust objects and was hoping to perform some basic
editing on them like:
- Joining = the merging of two hclust objects (so they will share one
root)
- Splicing = So to cut/extract a branch out of an hclust object - that by
itself will be an hclust object.
I noticed I could extract one element of an hclust object by turning it into
a dendrogram,
2010 Jul 19
1
possible bug in ape::extract.clade()
Hi,
I was recently splitting some massive phylo class objects with extract.clade()
and noticed what appears to be a bug in how tip labels are copied from the
full tree to the pruned tree. This possible bug was also mentioned here:
http://www.mail-archive.com/r-sig-phylo at r-project.org/msg00537.html
An example:
library(ape)
set.seed(5)
x <- matrix(rnorm(100), ncol=10)
p <-
2011 Sep 15
1
Model Selection with Phylogenetic Independent Contrasts
I'm trying to select a model under PCA using independent contrasts. Since
PICs need to be forced through the origin I've been using lmorigin for the
original regression, but it doesn't appear that stepAIC recognizes it. I
keep receiving an error message - "Error in na.fail.default(list(Phenology =
c(NA_integer_, NA_integer_, :
missing values in object"
I'm having