Jana Buerger | 2 Apr 11:53
Picon

clustering with random effect

Hello all!

I am looking for an idea how a site-species-matrix could be clustered
after correcting for a random effect, p.ex. different study areas.

more detailed explanation:
i have clustered my site-species-matrix and visualised clusters in a
constrained ordination plot obtained through rda command in package
vegan. results between both methods seem to be consistent.
now, i introduced a condition into the rda, in order to correct for a
random effect of different farms from which the samples of the
site-species-matrix were obtained. the clusters visualized in the
conditioned and constrained ordination plot change, of course.

which way would be appropriate to cluster the matrix, after controlling
for the farm?

randomLCA seems to be able to handle categorial data only(presence
absence data in the site species matrix), although a random effect may
be included.

i wondered if I could use part of the rda/cca-object for a new
clustering: the transformed X-matrix after removing variance due to the
condition (CCA$Xbar)? or is this mixing up distance based with vector
based methods?

thank you.
i'd be grateful for any comments.

Jana Bürger
(Continue reading)

Picon
Picon

Re: clustering with random effect


Maybe you are asking for some form of constrained clustering.

Try the palaeo package of Steve Juggins:

http://www.staff.ncl.ac.uk/staff/stephen.juggins/analysis.htm

HTH

Marcelino

At 11:53 02/04/2009, Jana Buerger wrote:
>Hello all!
>
>I am looking for an idea how a site-species-matrix could be clustered
>after correcting for a random effect, p.ex. different study areas.
>
>more detailed explanation:
>i have clustered my site-species-matrix and visualised clusters in a
>constrained ordination plot obtained through rda command in package
>vegan. results between both methods seem to be consistent.
>now, i introduced a condition into the rda, in order to correct for a
>random effect of different farms from which the samples of the
>site-species-matrix were obtained. the clusters visualized in the
>conditioned and constrained ordination plot change, of course.
>
>which way would be appropriate to cluster the matrix, after controlling
>for the farm?
>
>randomLCA seems to be able to handle categorial data only(presence
(Continue reading)

Jason S | 2 Apr 23:32
Picon
Favicon

missing data in PCA


Dear all,

I was wondering if you have good options to deal with missing data on a PCA in R. I guess I could simply delete
those cases, but I think there should be better options in terms of predicting them. Any hints?

Jason

      
	[[alternative HTML version deleted]]
Jari Oksanen | 3 Apr 07:55
Picon
Picon
Favicon

Re: missing data in PCA


On 03/04/2009, at 00:32 AM, Jason S wrote:

>
> Dear all,
>
> I was wondering if you have good options to deal with missing data  
> on a PCA in R. I guess I could simply delete those cases, but I  
> think there should be better options in terms of predicting them.  
> Any hints?
>
Howdy,

There may be better ways, but they are not easy... Check paragraph on  
missing data in multivariate task view. This lists several  
alternatives of multiple imputation data. About a year ago I tried  
some of them for multivariate analysis, but that was not quite  
straightforward. The problem was summarizing multivariate results.  
Things may have been changed since then, and there may be some canned  
routines.

Here is one link to multivariate task view (but you can use a mirror  
close to you):

http://cran.r-project.org/web/views/Multivariate.html

One thing you should remember: do not replace missing values with means.

Cheers, Jari Oksanen
(Continue reading)

Jana Buerger | 3 Apr 09:29
Picon

WG: Re: clustering with random effect

David,

to be honest I have used the terminology of sites and species only
analogously to make it easier to explain what a method I'm looking for.

In fact, I'm analysing pesticide use data. my sites are different
fields, the species are different pesticide treatments, for example a
number of fungicide treatments. Data in the matrix are numbers between
approx. 0 and 2.5 and stand for the amount of the treatment. There are
many fields from altogether 7 farms.
Now, i used clustering and PCA for analysing patterns of treatment,
and afterwards RDA to find important crop management factors influencing
patterns.

As I described inthe original post, in an RDA with a conditioning term
on "Farm" (or study area) the clusters don't separate anymore as in
unconditioned RDA.

Now, I wonder if I can have a clustering of sites with a conditioning
term on "Farm" sort of removed before clustering.

thanks for your help.

Jana Bürger
Universität Rostock
FG Phytomedizin
Satower Straße 48
18059 Rostock
Tel. 0381-498 3171

(Continue reading)

Michele Tobias | 3 Apr 08:49
Picon

Ordination with vegan's metaMDS

I have plant cover data for a number of sample plots and would like to 
do an ordination plot with the vegan package's metaMDS.  The problem is 
that some of my plots have matching data (for example, two plots have 5% 
cover by one species and nothing else).  Because of this, the 
dissimilarity measure between these is zero and the ordination doesn't 
work.  It gives me this message: "Error in metaMDSdist(comm, distance = 
distance, autotransform = autotransform,  : Zero dissimilarities are not 
allowed".
Does anyone have any suggestions on how to work with this?  Thank you 
for your help!

cheers,
Michele

--

-- 
Michele Tobias
PhD Student
Geography Graduate Group
University of California, Davis

tobias.michele@... 
mmtobias@...
tyler | 3 Apr 13:30
Picon

Re: Ordination with vegan's metaMDS

Michele Tobias <mmtobias@...>
writes:

> I have plant cover data for a number of sample plots and would like to
> do an ordination plot with the vegan package's metaMDS. The problem is
> that some of my plots have matching data (for example, two plots have
> 5% cover by one species and nothing else). Because of this, the
> dissimilarity measure between these is zero and the ordination doesn't
> work. It gives me this message: "Error in metaMDSdist(comm, distance =
> distance, autotransform = autotransform, : Zero dissimilarities are
> not allowed". Does anyone have any suggestions on how to work with
> this? Thank you for your help!
>

You can add the option zerodist = "add", which will add a small value to
all zero distances. See the help page for metaMDS.

Cheers,

Tyler

--

-- 
There is no theory of evolution. 
Just a list of animals Chuck Norris allows to live.

http://www.chucknorrisfacts.com/
Jari Oksanen | 3 Apr 14:09
Picon
Picon
Favicon

Re: WG: Re: clustering with random effect

On Fri, 2009-04-03 at 09:29 +0200, Jana Buerger wrote:
> David,
> 
> to be honest I have used the terminology of sites and species only
> analogously to make it easier to explain what a method I'm looking for.
> 
> In fact, I'm analysing pesticide use data. my sites are different
> fields, the species are different pesticide treatments, for example a
> number of fungicide treatments. Data in the matrix are numbers between
> approx. 0 and 2.5 and stand for the amount of the treatment. There are
> many fields from altogether 7 farms.
> Now, i used clustering and PCA for analysing patterns of treatment,
> and afterwards RDA to find important crop management factors influencing
> patterns.
> 
> As I described inthe original post, in an RDA with a conditioning term
> on "Farm" (or study area) the clusters don't separate anymore as in
> unconditioned RDA.
> 
> Now, I wonder if I can have a clustering of sites with a conditioning
> term on "Farm" sort of removed before clustering.
> 
Dear Jana Buerger,

You cannot get a residual ordination response *with* newdata in vegan.
Not yet at least, or not easily: in principle, you can if you know how
to do this. I know because I have done so for another purpose just this
week, but I haven't (yet) implemented that in the public versions of the
package. There are many aspects of the complexity of the user commands
that must be solved first, and then I should think if this increase of
(Continue reading)

Struve, Juliane | 3 Apr 14:37
Picon

DateTime column required by trip()

Dear list

I am trying to convert a dataframe first into a SpatialPointsDataFrame and then into a "trip" object.
The last line gives error message
"Error in validityMethod(object) :
trip only handles dates and times as POSIXt objects"
However, track_1646$Datm seems to be in the formant wanted by trip(), a two-element character vector
specifying date and time of the records.
What am I doing wrong ?
Thank you very much for any help.
Juliane

library(PBSMapping)
library(Trip)
track_1646=read.table("1646_2.txt", sep="\t", header=TRUE)
attr(track_1646, "projection") <- c("LL")
track_1646<- convUL(track_1646,km=FALSE)
track_1646$Datm <- as.POSIXct(strptime(paste(track_1646$date, track_1646$Time), "%d/%m/%Y %H:%M:%S"))
coordinates(track_1646)= c("X","Y")
class(track_1646)
track_1646
trip(track_1646,c("id","Datm"))

	[[alternative HTML version deleted]]
Jason S | 3 Apr 14:37
Picon
Favicon

Re: missing data in PCA


Dear Jari,

Thanks for the hints. A package such as mvnmle would be ideal, but it provides only the estimate of the
covariance matrix, not the raw data. However, comments like princomp and pca require the raw data.

Do you (or anyone else) know a command to do PCA straight from a covariance matrix?

best,

Jason

________________________________
From: Jari Oksanen <jari.oksanen@...>

Cc: Jari Oksanen <jari.oksanen@...>; r-sig-ecology@...
Sent: Friday, April 3, 2009 2:55:20 AM
Subject: Re: [R-sig-eco] missing data in PCA

On 03/04/2009, at 00:32 AM, Jason S wrote:

> 
> Dear all,
> 
> I was wondering if you have good options to deal with missing data on a PCA in R. I guess I could simply delete
those cases, but I think there should be better options in terms of predicting them. Any hints?
> 
Howdy,

There may be better ways, but they are not easy... Check paragraph on missing data in multivariate task
(Continue reading)


Gmane