Displaying 20 results from an estimated 100 matches similar to: "Data reconstruction following PCA using Eigen function"
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
2011 Mar 23
1
Function to crop p-values from multiple Anovas
Starting with data from a microarray experiment and I would like to analyse the influence of two factors (age, treatment) on gene expression.
Looking through the r-help archives and the web I tried the following:
I put my data in a dataframe similar to this one:
> example.df <- as.data.frame(matrix(data=runif(32,100,1000), nrow=4, ncol=4))
> example.df <-
2012 Nov 07
0
generic question about differences between PCA and DMFA
Dear list I'd like to have your opinion about my case study.
I'm analizing a dataset of 9 experiments and 15 variables with the aim to
highlight the variables that can majorly explain the variance between the
experiments.
This is an example with only 3 rows and 5 variables
var1 var2 var3 var4 var5 sample5 0,067
0,005 0,008 0,100 0,005 sample6 0,069 0,001
2005 Dec 29
2
loop
Dear All,
I have to use loop over an array so I am using following procedure
count<-1
repeat{
count<-count + 1
c(g[count],1:i[count]) ->qw
if(count>5)break
}
as a result qw is
[1] 0.9643836 1.0000000 2.0000000 3.0000000 4.0000000 5.0000000
[7] 6.0000000 7.0000000 8.0000000 9.0000000 10.0000000 11.0000000
[13] 12.0000000 13.0000000 14.0000000 15.0000000 16.0000000
2024 Jul 25
1
please help generate a square correlation matrix
?s 17:39 de 25/07/2024, Yuan Chun Ding via R-help escreveu:
> Hi R users,
>
> I generated a square correlation matrix for the dat dataframe below;
> dat<-data.frame(g1=c(1,0,0,1,1,1,0,0,0),
> g2=c(0,1,0,1,0,1,1,0,0),
> g3=c(1,1,0,0,0,1,0,0,0),
> g4=c(0,1,0,1,1,1,1,1,0))
> library("Hmisc")
> dat.rcorr =
2024 Jul 25
1
please help generate a square correlation matrix
HI Rui,
Thank you for the help!
You did not remove a row if zero values exist in both column pair, right?
Ding
From: Rui Barradas <ruipbarradas at sapo.pt>
Sent: Thursday, July 25, 2024 11:15 AM
To: Yuan Chun Ding <ycding at coh.org>; r-help at r-project.org
Subject: Re: [R] please help generate a square correlation matrix
?s 17:?39 de 25/07/2024, Yuan Chun Ding via R-help
2011 Nov 04
6
Matrix element-by-element multiplication
is there a way to do element-by-element multiplication as in Gauss
and MATLAB, as shown below? Thanks.
---
a
1.0000000
2.0000000
3.0000000
x
1.0000000 2.0000000 3.0000000
2.0000000 4.0000000 6.0000000
3.0000000 6.0000000 9.0000000
a.*x
1.0000000 2.0000000 3.0000000
4.0000000
2024 Jul 25
1
please help generate a square correlation matrix
Hi Rui,
You are always very helpful!! Thank you,
I just modified your R codes to remove a row with zero values in both column pair as below for my real data.
Ding
dat<-gene22mut.coded
r <- P <- matrix(NA, nrow = 22L, ncol = 22L,
dimnames = list(names(dat), names(dat)))
for(i in 1:22) {
#i=1
x <- dat[[i]]
for(j in (1:22)) {
#j=2
if(i == j) {
#
2024 Jul 25
1
please help generate a square correlation matrix
?s 20:47 de 25/07/2024, Yuan Chun Ding escreveu:
> Hi Rui,
>
> You are always very helpful!! Thank you,
>
> I just modified your R codes to remove a row with zero values in both column pair as below for my real data.
>
> Ding
>
> dat<-gene22mut.coded
> r <- P <- matrix(NA, nrow = 22L, ncol = 22L,
> dimnames = list(names(dat),
2024 Jul 26
1
please help generate a square correlation matrix
If I have understood the request, I'm not sure that omitting all 0
pairs for each pair of columns makes much sense, but be that as it
may, here's another way to do it by using the 'FUN' argument of combn
to encapsulate any calculations that you do. I just use cor() as the
calculation -- you can use anything you like that takes two vectors of
0's and 1's and produces fixed
2008 Feb 12
4
summary statistics
below is my data frame. I would like to compute summary statistics
for mgl for each river mile (mean, median, mode). My apologies in
advance- I would like to get something like the SAS print out of PROC
Univariate. I have performed an ANOVA and a tukey LSD and I would
just like the summary statistics.
thanks
stephen
RM mgl
1 215 0.9285714
2 215 0.7352941
3 215 1.6455696
4 215
2024 Jul 27
1
please help generate a square correlation matrix
Let's go back to the original posting.
> >
> >> in each column, less than 10% values are 1, most of them are 0;
> >
> >
> >
> >> so I want to remove a row with value of zero in both columns when calculate correlation between two columns.
> >
So we're talking about correlations between binary variables.
Suppose we have two 0-1-valued
2012 Aug 11
3
Problem when creating matrix of values based on covariance matrix
Hi,
I want to simulate a data set with similar covariance structure as my
observed data, and have calculated a covariance matrix (dimensions
8368*8368). So far I've tried two approaches to simulating data:
rmvnorm from the mvtnorm package, and by using the Cholesky
decomposition (http://www.cerebralmastication.com/2010/09/cholesk-post-on-correlated-random-normal-generation/).
The problem is
2007 Jan 30
2
Rbind for appending zoo objects
Hi R,
y1 <- zoo(matrix(1:10, ncol = 2), 1:5)
colnames(y1)=c("a","b")
y2 <- zoo(matrix(rnorm(10), ncol = 2), 6:10)
colnames(y2)=c("b","a")
> y1
a b
1 1 6
2 2 7
3 3 8
4 4 9
5 5 10
> y2
b a
6 0.9070204 0.3527630
7 1.2405943 0.8275001
8 -0.1690653 -0.1724976
9 -0.6905223 -1.1127670
10
2024 Jul 27
1
please help generate a square correlation matrix
Curses, my laptop is hallucinating again. Hope I can get through this.
So we're talking about correlations between binary variables.
Suppose we have two 0-1-valued variables, x and y.
Let A <- sum(x*y) # number of cases where x and y are both 1.
Let B <- sum(x)-A # number of cases where x is 1 and y is 0
Let C <- sum(y)-A # number of cases where y is 1 and x is 0
Let D <- sum(!x
2013 Mar 14
1
ggplot2 problem
Hello all!
I have a problem with ggplot2 library. I want to do an heat map and the y
variables are the year months. If I use the following code, he y values are
in alphabetical order, but I want it in month order.
The code is:
library(reshape)
library(ggplot2)
library(scales)
p <- ggplot(data.m, aes(variable, Month)) + geom_tile(aes(fill = value),
2005 Aug 23
1
matrix conformity with matrix 1x1 and scalars
Hello,
I am calculating this thing with vectors (b) and matrices (G,P):
b'G/sqrt(b'Pb)
where the denominator is a quadratic form and therefore always a scalar.
In Scilab, it is quite simple:
b'*G/sqrt(b'*P*b)
However, in R, the denominator is an (1x1)matrix and R claims it is non
conformable and I have to use drop() or as.numeric(). Like this:
> b = 1:2
> G=diag(1,2)
>
2024 Jul 27
1
please help generate a square correlation matrix
Hi Richard,
Nice to know you had similar experience.
Yes, your understanding is right. all correlations are negative after removing double-zero rows.
It is consistent with a heatmap we generated.
1 is for a cancer patient with a specific mutation. 0 is no mutation for the same mutation type in a patient.
a pair of mutation type (two different mutations) are exclusive for most of patients in
2009 May 06
3
Polycom Dialplan Digitmaps
I'm replacing a SoundPoint IP 600 with a SoundPoint IP 650.
I attempted to simply reuse the existing config files for the old phone
on the new phone, but the new phone would lock up on the 4th digit when
attempted to dial out certain numbers. So, I downloaded the newest
firmware and config templates from Polycom, and attempted to migrate the
settings. Seems I'm missing something from
2024 Jul 27
1
please help generate a square correlation matrix
Your expanded explanation helps clarify your intent. Herewith some
comments. Of course, feel free to ignore and not respond. And, as
always, my apologies if I have failed to comprehend your intent.
1. I would avoid any notion of "statistical significance" like the
plague. This is a purely exploratory exercise.
2. My understanding is that you want to know the proportion of rows in
a