Displaying 20 results from an estimated 200 matches similar to: "correlated data"
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
2013 Mar 05
3
Simulate binary correlated data
Dear R experts,
I am trying to simulate correlated binary data and have stumbled upon the
following problem:
With the help of "binarySimCLF" or "mvpBinaryEp" I have been able to
simulate correlating binary vectors given certain mean values and a desired
correlation. My problem is that these procedures do not allow you to specify
the exact vector for which you want to generate
2012 Mar 15
6
Generation of correlated variables
Hi everyone.
Based on a dependent variable (y), I'm trying to generate some independent
variables with a specified correlation. For this there's no problems.
However, I would like that have all my "regressors" to be orthogonal (i.e.
no correlation among them.
For example,
y = x1 + x2 + x3 where the correlation between y x1 = 0.7, x2 = 0.4 and x3 =
0.8. However, x1, x2 and x3
2011 Aug 31
0
generate correlated qualitative data
Dear R experts:
I have following problem:
# myfunction
mfun1 <- function(x) {
if ( x == 2){
xv <- sample(c(2,1,0),100, replace = T, prob = c(0.6, 0.2, 0.2))
}
if ( x == 1){
xv <- sample(c(1,0),100, replace = T, prob = c(0.6, 0.4))
}
if ( x == 0) {
xv <- sample(c(0,0),100, replace = T, prob = c(0.5, 0.5))
}
return(xv)
}
# applying the function
x = mfun1(1)
# just what I
2011 Sep 01
0
UNSOLVED: Fwd: generate correlated qualitative data
The problem remain unsolved. If you have any idea please do suggest
....................
thank you;
Ram H
On Wed, Aug 31, 2011 at 12:06 PM, Ram H. Sharma <sharma.ram.h@gmail.com>wrote:
> Dear R experts:
>
> I have following problem:
>
> # myfunction
> mfun1 <- function(x) {
> if ( x == 2){
> xv <- sample(c(2,1,0),100, replace = T, prob = c(0.6, 0.2,
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
2009 Nov 25
3
Random data
Hi,
how can I produce random data which lies around a straight line with angle
45 degree.
Similar to this image: http://zoonek2.free.fr/UNIX/48_R/g134.png
Cheers
--
View this message in context: http://old.nabble.com/Random-data-tp26513822p26513822.html
Sent from the R help mailing list archive at Nabble.com.
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
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
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
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
the
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. I am quite
2008 Apr 14
1
Vegan R^2 and tau values for metaMDS
I am using the function metaMDS with jaccard distances to ordinate a
set of constituent by site matrix. I can post this data if it would
be helpful, but it is large to include in an email. I can also
provide reproducable code if necessary. I would like to get an 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
2007 Nov 16
4
Permutation of a distance matrix
Hi there,
I would like to find a more efficient way of permuting the rows and columns of a symmetrical matrix that represents ecological or actual distances between objects in space. The permutation is of the type used in a Mantel test.
Specifically, the permutation has to accomplish something like this:
Original matrix addresses:
a11 a12 a13
a21 a22 a23
a31 a32 a33
Example
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.
Hi,
forgive me if someone has already posted about this but I have had a look and cannot find the answer, also I am very new to R and been getting the grips with this.
I have been trying to use Adonis to find out if there are significant 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
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
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
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