[R] error message in cor.dist

2008-08-26 Thread Tanya Yatsunenko
Hello,

I am trying to calculate pairwise Pearson correlation distances, and 
using biodist package, function "cor.dist".
I start with a table of 4 rows and about 10 columns. (each of 4 samples, 
or rows have values in each of the 10 categories, no zeros or NAs).

I am getting an error message:

 > cor.dist(dmatrixD)
Error in cor(t(x)) : missing observations in cov/cor
In addition: Warning message:
In cor(t(x)) : NAs introduced by coercion

Does anyone know what that means?
Also, are there other functions for Pearson distances?
Thanks!

-- 
Tanya.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] candisc() error message

2008-06-15 Thread Tanya Yatsunenko
Hi,
I am doing canonical discriminant analysis using candisc function from 
the candisc package.
My input is a table of species distribution (columns = abundance of each 
species in each sample)  in samples that are split by categories (rows), 
and I want to know whether each category is associated with a particular 
set of species and their abundances.
I have 20 rows (samples) split into 6 categories, and 17 columns (species).

I am getting the following error message, which I don't understand:

 > can<-candisc(mod, data=canIN)
Error in linear.hypothesis.mlm(mod, hyp.matrix.2, SSPE = SSPE, V = V,  :
  The error SSP matrix is apparently of deficient rank = 16 < 17

Does anyone has any experience in candisc?

-- 
Tanya.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] PCA : Error in eigen(cv,

2008-06-30 Thread Tanya Yatsunenko
Hi all,

I am doing bootstrap on a distance matrix, in which samples have been 
drawn with replacement. After that I do PCA on a resulted matrix, and 
these 2 steps are repeated 1000 times.

pca(x) is a vector where I wanted to store all 1000 PCAs; and x is from 
1 to 1000
SampleD is a new matrix after resampling;

I am getting the following error message, which I don't understand:

+pca(x)<-princomp(SampleD[i,j])
+ }
Error in eigen(cv, symmetric = TRUE) : infinite or missing values in 'x'

Should I maybe not use a vector, but matrix instead?
Thanks!

-- 
Tanya.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] PCA : Error in eigen(cv,

2008-07-01 Thread Tanya Yatsunenko
Ok, the mistake was in the pca(x)<-princomp(SampleD[i,j]), should've used
pca(x)<-princomp(SampleD) instead.
Now, is there anyway to keep track of the matrix index, so in the end of all
PCAs, I can tell which score/loading belongs to which sample?
Thanks everyone!

On Mon, Jun 30, 2008 at 9:08 PM, Tanya Yatsunenko <[EMAIL PROTECTED]> wrote:

>  Hi all,
>
> I am doing bootstrap on a distance matrix, in which samples have been drawn
> with replacement. After that I do PCA on a resulted matrix, and these 2
> steps are repeated 1000 times.
>
> pca(x) is a vector where I wanted to store all 1000 PCAs; and x is from 1
> to 1000
> SampleD is a new matrix after resampling;
>
> I am getting the following error message, which I don't understand:
> 
> +pca(x)<-princomp(SampleD[i,j])
> + }
> Error in eigen(cv, symmetric = TRUE) : infinite or missing values in 'x'
>
> Should I maybe not use a vector, but matrix instead?
> Thanks!
>
> --
> Tanya.
>
>


-- 
Tanya

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] coding for categorical variables with unequal observations

2008-04-03 Thread Tanya Yatsunenko
Hi,
I am doing multiple regression, and have several X variables that are 
categorical.
I read that I can use dummy or contrast codes for that, but are there 
any special rules when there're unequal #observations in each groups (4 
females vs 7 males in a "gender" variable)?
Also, can R generate these codes for me?
THanks.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] coding for categorical variables with unequal observations

2008-04-03 Thread Tanya Yatsunenko
Also, since I just started to use R, I have trouble generating and
understanding some of the codes, especially choosing the correct ones.
Thanks!
tanya

On Thu, Apr 3, 2008 at 3:54 PM, Tanya Yatsunenko <[EMAIL PROTECTED]> wrote:

> Hi,
> I am doing multiple regression, and have several X variables that are
> categorical.
> I read that I can use dummy or contrast codes for that, but are there any
> special rules when there're unequal #observations in each groups (4 females
> vs 7 males in a "gender" variable)?
> Also, can R generate these codes for me?
> THanks.
>
>


-- 
Tanya

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.