similar to: gower distance calculation

Displaying 20 results from an estimated 4000 matches similar to: "gower distance calculation"

2004 Nov 09
1
gdist and gower distance
Dear All, I would like to ask clarifications on the gower distnce matrix calculated by the function gdistin the library mvpart. Here is a dummy example: > library(mvpart) Loading required package: survival Loading required package: splines mvpart package loaded: extends rpart to include multivariate and distance-based partitioning > x=matrix(1:6, byrow=T, ncol=2) > x [,1]
2005 Apr 18
2
Very Slow Gower Similarity Function
Hello, I am a relatively new user of R. I have written a basic function to calculate the Gower similarity function. I was motivated to do so partly as an excercise in learning R, and partly because the existing option (vegdist in the vegan package) does not accept missing values. I think I have succeeded - my function gives me the correct values. However, now that I'm starting to use it with
2006 Aug 13
1
Gower Similarity Coefficient
I'm interested in clustering my data using the Gower Similarity Coefficient, and I was wondering if R is capable of using that metric Timothy Rye [[alternative HTML version deleted]]
2009 Jul 14
2
Cluster analysis with missing data
Hi folks, I tried for the first time hclust. Unfortunately, with missing data in my data file, it doesn't seem to work. I found no information about how to consider missing data. Omission of all missings is not really an option as I would loose to many cases. Thanks in advance Holger -- View this message in context:
2006 Mar 08
1
function gdist, dist and vegdist in mvpart
Dear R community, I am analyzing plant communities with the function mvpart, using a dissimilarit matrix as input. The matrix is calculated with the funtion gdist. fit <- mvpart(gdist (ba12[,18:29], meth="maximum", full=TRUE, sq=F) ~ beers + slope_dem + elev_dem+ plc_dem + pr_curv+ +curv+max_depth+doc_rocks+ abandon+land_use+ca_old, data=ba12, xv="p") This
2005 Sep 26
1
calculating distances using Gower's coefficient on mixed variables.
I want to compute the distances in a mixed variable matrix using the Gower coefficient. I understand it is possible to calculate distances in a matrix with mixed variables using the dudi.pco command. How would this work? Jorine
2008 Oct 13
1
Gower distance between a individual and a population
Hi the list, I need to compute Gower distance between a specific individual and all the other individual. The function DAISY from package cluster compute all the pairwise dissimilarities of a population. If the population is N individuals, that is arround N^2 distances to compute. I need to compute the distance between a specific individual and all the other individual, that is only N
2012 Oct 15
1
weighting variables using Gower with DAISY
Hello, I am running DAISY in R and using the GOWER metric since I am working with mixed variables. I am wondering if there is a way to weight the different variables. I see that there is a weight value for Gower but do not know if this is how to weight the diffrent variables with different weighting values. Please advise if there is a way to weight the different variables. Thank you. -- View
2010 Feb 26
2
Error in mvpart example
Dear all, I'm getting an error in one of the stock examples in the 'mvpart' package. I tried: require(mvpart) data(spider) fit3 <- rpart(gdist(spider[,1:12],meth="bray",full=TRUE,sq=TRUE)~water+twigs+reft+herbs+moss+sand,spider,method="dist") #directly from ?rpart summary(fit3) ...which returned the following: Error in apply(formatg(yval, digits - 3), 1,
2011 Oct 03
4
distance coefficient for amatrix with ngative valus
Hi, I need to run a PCoA (PCO) for a data set wich has both positive and negative values for variables. I  could not find any distancecoefficient other than euclidean distace running for the data set. Are there any other coefficient works with negtive values.Also I cannot get summary out put (the eigen values) for PCO as for PCA.   Thanks. Dilshan [[alternative HTML version deleted]]
2013 Dec 08
3
Why daisy() in cluster library failed to exclude NA when computing dissimilarity
Hi, According to daisy function from cluster documentation, it can compute dissimilarity when NA (missing) value(s) is present. http://stat.ethz.ch/R-manual/R-devel/library/cluster/html/daisy.html But why when I tried this code library(cluster) x <- c(1.115,NA,NA,0.971,NA) y <- c(NA,1.006,NA,NA,0.645) df <- as.data.frame(rbind(x,y)) daisy(df,metric="gower") It gave this
2008 Sep 02
2
cluster a distance(analogue)-object using agnes(cluster)
I try to perform a clustering using an existing dissimilarity matrix that I calculated using distance (analogue) I tried two different things. One of them worked and one not and I don`t understand why. Here the code: not working example library(cluster) library(analogue) iris2<-as.data.frame(iris) str(iris2) 'data.frame': 150 obs. of 5 variables: $ Sepal.Length: num 5.1 4.9 4.7
2010 Jul 20
1
Exporting NMDS distance matris to csv
If you submit these lines, you end up with variable "vare.dis". I want to export vare.dis to csv. Stuck I am. library(vegan,logical.return = TRUE) #return=true verifies package is available library(MASS,logical.return=TRUE) #return=true verifies package is available data(varespec) #varespec is an example data file in the vegan package vare.dis <- vegdist(varespec)
2011 Nov 24
4
I cannot get species scores to plot with site scores in MDS when I use a distance matrix as input. Problems with NA's?
Hi, First I should note I am relatively new to R so I would appreciate answers that take this into account. I am trying to perform an MDS ordination using the function ?metaMDS? of the ?vegan? package. I want to ordinate species according to a set of functional traits. ?Species? here refers to ?sites? in traditional vegetation analyses while ?traits? here correspond to ?species? in such
2006 Oct 21
1
Problems running IsoMDS using vegdist with pres-abs data and two sites with zero distance
Hi I have just (finally) started to poke around in R and wanted to analyse a stream fish dataset with 28 sites and 18 species. When trying to follow the Vegan manual to run nmds from distance measures calculated by the vegdist function it turns out that I have two sites (streams) with the exactly the same four species (I have used pres-abs data in this case). When I try to run isoMDS I get an
2010 Apr 16
2
managing data and removing lines
Hi, I am very new to R and I've been trying to work through the R book to gain a better idea of the code (which is also completely new to me). Initially I imputed my data from a text file and that seemed to work ok, but I'm trying to examine linear relationships between gdist and gair, gdist and gsub, m6dist and m6air, etc. This didn't work and I think it might have something to do
2009 Oct 14
2
metaMDS NMDS: use of alternative distances?
Dear r-helpers! How can I integrate other distances (in the form of a dist object) into function metaMDS? The problem: metaMDS needs the original data.frame for the calculation and only the default distances of function vegdist are allowed. Any suggestions are greatly appreciated! Thank you, Kim -- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 - sicherer, schneller
2013 Dec 07
1
How to perform clustering without removing rows where NA is present in R
I have a data which contain some NA value in their elements. What I want to do is to **perform clustering without removing rows** where the NA is present. I understand that `gower` distance measure in `daisy` allow such situation. But why my code below doesn't work? __BEGIN__ # plot heat map with dendogram together. library("gplots") library("cluster")
2010 Feb 02
2
hvcluster() with distance method from vegdist(), package = vegan
hello, i'd be happy if someone could provide help with the following problem: i have a dist.matrix that comes from vegdist() function of the vegan package. the used method = "horn" is not accepted as argument in hvcluster(...,dist.method="..."). is there a way to incorporate the method "horn" in hvcluster()? thanks in advance! yours, kay -- View this
2012 Oct 18
0
want to count 2 NULLS as disimilar with DIANA/DAISY/GOWER
I am using DIANA/DAISY/GOWER. Some of my categorical data include NULLS. When assessing disimilarity, these NULLS are considered similar. I do not want these NULLS to contribute towards similarity. Instead is there a way for these NULLS to each be considered different so as to contribute to disimiliarity and not simillarity? Also, I do not want to change these NULLS in the data as I need them for