search for: ecodist

Displaying 20 results from an estimated 48 matches for "ecodist".

2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
I would like to perform partial mantel tests on only within group values, with "between group" values assigned to NA. This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error. is it possible to perform this test in ecodist? many thanks Nevil Amos > library(ecodist) > library(ncf) > x<-sample(1:1000,20) > y<-sample(1:1000,20) > z<-sample(1:1000,20) > M...
2012 Feb 27
1
How to incorporate interaction terms in MRM function of ecodist library?
Hi, I'm interested in incorporating some interaction terms between my explanatory variables (distance matrices in this case) when I'm using the function MRM of the package ecodist. The function is doing a multiple regression on distance matrices. I can get the function to work perfectly on my explanatory matrices by adding a (+) sign as known. However, when I try to use the (*) sign or (:) between two terms that I'd like to check the interaction for, I get same results a...
2011 Oct 16
2
How to plot CI's (llim ulim) on ecodist mgram
I would like to put confidence intervals on a mantel corellogram they are already calculated in the pmgram object but I am unsure how I get the x value in order to plot them? package(ecodist) X<-1:100 Y<-rnorm(1:100) Z<-rnorm(1:100) XY<-dist(data.frame(X,Y)) YX<-dist(data.frame(Y,X)) my.mgram<-mgram(XY,XZ) plot(my.mgram) print(my.mgram) > print(my.mgram) $mgram lag ngroup mantelr pval llim ulim [1,] 3.770055 672 0.500012737...
2012 Jun 28
2
Size of subsample in ecodist mantel()
What is the size of the boostrapped subsample in ecodist mantel() thanks [[alternative HTML version deleted]]
2009 May 08
2
partial mantel tests "Ecodist"
Hi all, I'm searching for a little clarification on partial mantel tests (ecodist package) I've a distance matrix (x,y), and several others containing environmental/chemical variables. Based on the help file, and the package instructions I've managed to implement the tests as; var1 ~ env1 + space to partial out the effect of space and test the relationship between...
2011 Jan 20
1
Problems with ecodist
Dear Dr.Goslee and anyone may intrested in matrix manipulate, I am using your ecodist to do mantel and partial mantel test, I have locality data and shape variation data, and the two distance matrixs are given as belowings. When I run the analysis, it is always report that the matrix is not square, but I didn't know what's wrong with my data. Would you please help me on this...
2011 Feb 20
8
Generating uniformly distributed correlated data.
I wish to generate a vector of uniformly distributed data with a defined correlation to another vector The only function I have been able to find doing something similar is corgen from the library ecodist. The following code generates data with the desired correlation to the vector x but the resulting vector y is normal and not uniform distributed library(ecodist) x <- runif(10^5) y <- corgen(x=x, r=.5)$y Do anyone know a similar function generating uniform distributed data or a way o...
2007 Oct 17
1
correlated data
Hi!! I am trying to generate data with specific correlation using corgen method from the ecodist package. It does not seem to generate the data properly. I am listing the code below. Secondly, when I put the code given below all in one file and source it, it is unable to complete the task. But when I execute it one at a time it is able to complete it. Can someone point out any mistake that I m...
2008 Apr 14
1
Vegan R^2 and tau values for metaMDS
...R^2 value for the axes of the ordination configuration that I get with metaMDS in the vegan package is there a way to do this- is it stored in some object returned by the function that I am unaware of- or is there another function inside of vegan or elsewhere- that I can use? I have seen mention of ecodist function nmds having an R^2 would this be the place to go? -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problem...
2007 Nov 16
4
Permutation of a distance matrix
...s and columns are conserved in the permutation. Basically, I have been doing this in a "for" loop by (1) permuting the raw data vector using "sample", (2) generating a lower triangular distance matrix from the permuted raw data using the "distance" function from "ecodist', and (3) calculating a bunch of statistics including the Mantel correlation and multiple regression statistics, which are then stored in blank matrices that were declared prior to beginning the loop. The whole procedure needs to repeat at least 999 times but 1999 times would be better and 999...
2010 Dec 14
3
from table to matrix
I have a table like this: Date TIME Q A a 1 A b 2 A c 3 B a 4 B b 5 B c 6 C a 7 C b 8 C c 9 I want use R language to turn it to a matrix like : a b c A 1 2 3 B 4 5 6 C 7 8 9 I am new to R , anyone can help? Thanks in advance! have a table like this: Date TIME Q A a 1 A b 2 A c 3 B a
2011 Oct 04
2
Adonis and nmds help and questions for a novice.
...nificant difference between groups on data that I have analyses with NMDS, and have been struggling with getting this to work and understanding what is going on. I am looking at diversity in different soils with either woodland or grassland habitats. I have run the scripts library(vegan) library(ecodist) library(MASS) mydata <- read.table("ash_data.csv", header=TRUE, sep=",", row.names="Site") envdata_fit <- read.table("ash_env.csv", header=TRUE, sep=",", row.names="Site") #distance matrix of samples using bray curtis d= bcdist(my...
2018 May 08
2
Bilateral matrix
I have data on current and previous location of individuals. I would like to have a matrix with bilateral movement between locations. I would like the final output to look like the second table below. I have tried using crosstab() from the ecodist but I do not have another variable to measure the flow. Ultimately I would like to compute the probability of movement between cities (movement to city_i/total movement from city_j). Is it possible to aggregate the data in this way? Any guidance would be highly appreciated. Thank you! # Original...
2012 Mar 22
1
How do you distinguish between characters on a pco plot?
I have a presence/absence matrix for which I create a distance matrix and then perform pco analysis on. /library(ecodist) table <- read.table("matrix.pa") dist <- dist(table, method = "euclidean", diag = FALSE, upper = FALSE) dist.pco <- pco(dist)/ When I plot the pco analysis of the distance matrix I want to be able to distinguish between certain characters, for example if the distance...
2007 Jun 12
4
Generating artificial datasets with a specific correlation coefficient.
I need to create artificial datasets with specific correlation coefficients (i.e. a dataset that returns r = 0.30, etc.) as examples for a lab I am teaching this summer. Is there a way to do that in R? Thanks. Jim Milks Graduate Student Environmental Sciences Ph.D. Program 136 Biological Sciences Wright State University 3640 Colonel Glenn Hwy Dayton, OH 45435 [[alternative HTML version
2003 Sep 12
2
partial mantel
Dear all, Has anyone written R code for partial Mantel Tests- as described for instance in Legtendre & Legendre (1998) ? In other words, in a community ecology analysis, I would like to calculate the correlation between two dissimilarity matrices, controlling for a third distance matrix representing geographical distances between sites. Thanks! Christophe Bouget Biodiversité et gestion des
2018 May 08
3
Bilateral matrix
...t; wrote: > > I have data on current and previous location of individuals. I would like > > to have a matrix with bilateral movement between locations. I would like > > the final output to look like the second table below. > > > > I have tried using crosstab() from the ecodist but I do not have another > > variable to measure the flow. Ultimately I would like to compute the > > probability of movement between cities (movement to city_i/total movement > > from city_j). > > > > Is it possible to aggregate the data in this way? Any guidance wou...
2018 May 08
0
Bilateral matrix
...t;milujisb at gmail.com> wrote: > I have data on current and previous location of individuals. I would like > to have a matrix with bilateral movement between locations. I would like > the final output to look like the second table below. > > I have tried using crosstab() from the ecodist but I do not have another > variable to measure the flow. Ultimately I would like to compute the > probability of movement between cities (movement to city_i/total movement > from city_j). > > Is it possible to aggregate the data in this way? Any guidance would be > highly appreci...
2010 Nov 04
3
avoid a loop
Let's suppose I have userids and associated attributes... columns a and b a <- c(1,1,1,2,2,3,3,3,3) b <- c("a","b","c","a","d","a", "b", "e", "f") so a unique list of a would be id <- unique(a) I want a matrix like this... [,1] [,2] [,3] [1,] 3 1 2 [2,] 1 2 1 [3,]
2018 May 16
0
Bilateral matrix
...e data on current and previous location of individuals. I would >> like >> > to have a matrix with bilateral movement between locations. I would like >> > the final output to look like the second table below. >> > >> > I have tried using crosstab() from the ecodist but I do not have another >> > variable to measure the flow. Ultimately I would like to compute the >> > probability of movement between cities (movement to city_i/total >> movement >> > from city_j). >> > >> > Is it possible to aggregate the data...