[R-sig-eco] simple quetion about posthoc in adonis

2013-03-01 Thread Paolo Piras


I saw in some forum some considerations about this topic.
Maybe I propose a brutal (perhaps incorrect?) solution; given more than two 
groups in a model subjected to permutation in adonis.and if the global 
model is significant
if one contrasts pairwise all possible pair comparisons between groups in a 
subset containing just those two groups one could use that as a posthoc?

Of course some p-value correction can be applied ex-post using p.adjust().

thankyou in advance for any advice
best
paolo
___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] multivariate continuous response and ordinal predictor(s)

2013-05-08 Thread Paolo Piras

Dear all,
I need to run a model with multivariate continuous responses and one (or more) 
ORDINAL (i.e. 1,2,3, etc.) predictor variables; these are not factors because 
are ordinal; the more intuitive solution could be to apply a standard lm() but 
I ask you if some more appropriate strategies can be adopted. 
I saw VGAM package but it does not seem to do  what I want
Thankyou in advance for any advice
best
paolo
___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] simple question about nmds

2013-06-10 Thread Paolo Piras
Hi,
actually I think you CAN use them (as predictors or response either) because, 
albeit in its unique way, NMDS **IS** a method to summarize a highly 
multidimensional phenomenon.
best
paolo

Da: r-sig-ecology-boun...@r-project.org [r-sig-ecology-boun...@r-project.org] 
per conto di Simone Ruzza [simone.ruzz...@gmail.com]
Inviato: lunedì 10 giugno 2013 10.26
A: r-sig-ecology@r-project.org
Oggetto: Re: [R-sig-eco] simple question about nmds

Apolologies, I re-phrase what I have said before: I would be interested
using the site scores within a multiple regression settings, but the the
scores a response rather than predictors.

Best wishes,

Simone


On Mon, Jun 10, 2013 at 9:19 AM, Simone Ruzza wrote:

> Dear list,
>
> apologies for the total beginner's question. I was wondering whether
> one can use the site scores of an NMDS ordination to do do further
> analyses as typically done for other ordination methods, e.g. use the
> axis scores as predictors in a multiple regression settings. I think
> it should not be possible, because the aim of NMDS is not to summarize
> the major patterns of variations withing a multivariate dataset. Do
> you confirm?
>
> thanks in advance,
>
> Simone
>

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Paolo Piras
Dear list,
I would like to easily compute the adjusted R-square in a lm model without 
intercept (excluding the intercept is essential for my analysis)

I found that RsquareAdj() in vegan returns NA if the argument is  a 
multiple-multivariate lm model thus including multivariate responses and 
multiple predictors, while it works for univariate response and multiple 
predictors. 

For example:
library(vegan)

yy<-matrix(rnorm(200,0,1),ncol=4)
xx<-matrix(rnorm(200,0,1),ncol=4)
RsquareAdj(lm(yy~xx-1))
RsquareAdj(lm(yy[,1]~xx-1))



There some specific reason for this behavior?
Thanks in advance for any advice
best regards
Poalo






___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Paolo Piras
Thankyou very much Jari!
I think that it is nearly ok
what I would like to have is the same as in
RsquareAdj(vegan::rda(yy,xx))

that is a GLOBAL measure of the association
BUT...I want it for a multiple-multivariate lm model that does not include the 
intercept;
an alternative could be to build a rda design for the exclusion of intercept 
but I really cannot figure out how to do it. 

I think I just need to compute the average of single adjusted r squared from 
the output of your line of code, 
But the results are not identical 
EXAMPLE  WITH INTERCEPT IN ORDER TO COMPARE WITH RDA

RsquareAdj(vegan::rda(yy,xx))
mean(sapply(summary(lm(yy~xx)), function(x) c("r.squared" = x$r.squared, 
"adj.r.squared" = x$adj.r.squared))[2,])

Or I just miss something in this computation

Thanks again for any further suggestion



Da: Jari Oksanen 
Inviato: giovedì 3 ottobre 2013 14.25
A: Paolo Piras; r-sig-ecology@r-project.org
Oggetto: RE: [R-sig-eco] vegan RsquareAdj() for lm models

Specific reason is that nobody has implemented this. These things don't come by 
automatic writing, but somebody must do them.

What would you expect to get? Is this what was on your mind:

> sapply(summary(lm(yy~xx-1)), function(x) c("r.squared" = x$r.squared, 
> "adj.r.squared" = x$adj.r.squared))
  Response Y1 Response Y2 Response Y3 Response Y4
r.squared  0.06845032  0.04788037  0.01702738  0.11253059
adj.r.squared -0.01255400 -0.03491264 -0.06844849  0.03535934


This could be implemented, but (1) is this what you or anybody else would like 
to have?, (2) how many things would it break by returning several values 
instead of one?

If you want to have this, you really do not need to use vegan. 
vegan:::RsquareAdj.lm() takes its results from summary(). You can 
use that stats:::summary.lm directly.

Cheers, Jari Oksanen


From: r-sig-ecology-boun...@r-project.org [r-sig-ecology-boun...@r-project.org] 
on behalf of Paolo Piras [paolo.pi...@uniroma3.it]
Sent: 03 October 2013 14:59
To: r-sig-ecology@r-project.org
Subject: [R-sig-eco] vegan RsquareAdj() for lm models

Dear list,
I would like to easily compute the adjusted R-square in a lm model without 
intercept (excluding the intercept is essential for my analysis)

I found that RsquareAdj() in vegan returns NA if the argument is  a 
multiple-multivariate lm model thus including multivariate responses and 
multiple predictors, while it works for univariate response and multiple 
predictors.

For example:
library(vegan)

yy<-matrix(rnorm(200,0,1),ncol=4)
xx<-matrix(rnorm(200,0,1),ncol=4)
RsquareAdj(lm(yy~xx-1))
RsquareAdj(lm(yy[,1]~xx-1))



There some specific reason for this behavior?
Thanks in advance for any advice
best regards
Poalo






___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] vegan RsquareAdj() for lm models

2013-10-03 Thread Paolo Piras
Thanks Jari, I understand
Before going trough the code of rda I would prefer to see if I can do this 
using RsquareAdj

When you say "The default method can be called as RsquareAdj(x, n, m), and in 
the default method x is the unadjusted correlation...etc.."
my problem is to extract the global unadjusted correlation that is a single 
global R-square; 
As I said, just averaging the single adjusted R-squared does not return the 
same values of RsquareAdj

best
paolo



Da: Jari Oksanen 
Inviato: giovedì 3 ottobre 2013 15.56
A: Paolo Piras; r-sig-ecology@r-project.org
Oggetto: RE: [R-sig-eco] vegan RsquareAdj() for lm models

Paolo,

See ?RsquareAdj for the call interface. The default method can be called as 
RsquareAdj(x, n, m), and in the default method x is the unadjusted correlation, 
n is the number of observations and m is the number of parameters (degrees of 
freedom) in the fitted model. Specific methods for univariate lm or for rda 
(and some others) find these variables in the result object, but then they just 
call the default method with the found x, n and m. You can build your model on 
that. It is possible to build a specific function for mlm objects, but nobody 
has done so in vegan.

You cannot build an rda design without an intercept. It was a conscious design 
decision to make this impossible without hacking the rda.default code (I even 
say this in decision-vegan vignette). I am not going to make easy to have 
non-centred RDA: I care too much about people and i don't want to do evil. If 
you really *know* that you need non-centred RDA. then you know how to change 
those lines of code in rda.default.

Cheers, Jari Oksanen
____
From: Paolo Piras [paolo.pi...@uniroma3.it]
Sent: 03 October 2013 15:52
To: Jari Oksanen; r-sig-ecology@r-project.org
Subject: RE: [R-sig-eco] vegan RsquareAdj() for lm models

Thankyou very much Jari!
I think that it is nearly ok
what I would like to have is the same as in
RsquareAdj(vegan::rda(yy,xx))

that is a GLOBAL measure of the association
BUT...I want it for a multiple-multivariate lm model that does not include the 
intercept;
an alternative could be to build a rda design for the exclusion of intercept 
but I really cannot figure out how to do it.

I think I just need to compute the average of single adjusted r squared from 
the output of your line of code,
But the results are not identical
EXAMPLE  WITH INTERCEPT IN ORDER TO COMPARE WITH RDA

RsquareAdj(vegan::rda(yy,xx))
mean(sapply(summary(lm(yy~xx)), function(x) c("r.squared" = x$r.squared, 
"adj.r.squared" = x$adj.r.squared))[2,])

Or I just miss something in this computation

Thanks again for any further suggestion



Da: Jari Oksanen 
Inviato: giovedì 3 ottobre 2013 14.25
A: Paolo Piras; r-sig-ecology@r-project.org
Oggetto: RE: [R-sig-eco] vegan RsquareAdj() for lm models

Specific reason is that nobody has implemented this. These things don't come by 
automatic writing, but somebody must do them.

What would you expect to get? Is this what was on your mind:

> sapply(summary(lm(yy~xx-1)), function(x) c("r.squared" = x$r.squared, 
> "adj.r.squared" = x$adj.r.squared))
  Response Y1 Response Y2 Response Y3 Response Y4
r.squared  0.06845032  0.04788037  0.01702738  0.11253059
adj.r.squared -0.01255400 -0.03491264 -0.06844849  0.03535934


This could be implemented, but (1) is this what you or anybody else would like 
to have?, (2) how many things would it break by returning several values 
instead of one?

If you want to have this, you really do not need to use vegan. 
vegan:::RsquareAdj.lm() takes its results from summary(). You can 
use that stats:::summary.lm directly.

Cheers, Jari Oksanen


From: r-sig-ecology-boun...@r-project.org [r-sig-ecology-boun...@r-project.org] 
on behalf of Paolo Piras [paolo.pi...@uniroma3.it]
Sent: 03 October 2013 14:59
To: r-sig-ecology@r-project.org
Subject: [R-sig-eco] vegan RsquareAdj() for lm models

Dear list,
I would like to easily compute the adjusted R-square in a lm model without 
intercept (excluding the intercept is essential for my analysis)

I found that RsquareAdj() in vegan returns NA if the argument is  a 
multiple-multivariate lm model thus including multivariate responses and 
multiple predictors, while it works for univariate response and multiple 
predictors.

For example:
library(vegan)

yy<-matrix(rnorm(200,0,1),ncol=4)
xx<-matrix(rnorm(200,0,1),ncol=4)
RsquareAdj(lm(yy~xx-1))
RsquareAdj(lm(yy[,1]~xx-1))



There some specific reason for this behavior?
Thanks in advance for any advice
best regards
Poalo






___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



[R-sig-eco] envfit() in vegan

2013-10-16 Thread Paolo Piras
Dear list,
I write you because I do not understand the behavior of envfit() in vegan. 
Basically, it takes a matrix coming from an ordination procedure and it fits on 
it another matrix  (often an environmental matrix).
The projections of points onto vectors have maximum correlation with 
corresponding environmental variables.

A permutation test is associated to this procedure and it basically performs a 
series of correlations between any column in the environmental matrix and the 
ordnation matrix.
Maybe my question is trivial (or simply ...wrong) but..intuitively, this should 
return the same results found from a series of separate multivariate 
regressions between any single column in the environmental matrix and the 
entire ordination matrix.
However it is not the case, being the envfit() results much more liberal when 
compared to regression (i.e. using rda) and the r2 are drastically larger than 
R-sq from rda.
I suspect that the metric undergoing the permutation test of significance in 
envfit() that is squared correlation coefficient (r^2) does not correspond to 
the R-sq calculated using rda. 

Thanks in advance for any advice
best
paolo






___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] envfit() in vegan

2013-10-17 Thread Paolo Piras
Thankyou very much Jari,
actually this clarifies anything in my mind about this topic. 
What I was looking for is plotting the correlation vectors of my environmental 
variables (that in my hypothesis are the independent variables) on to my 
ordination scores of my dependent table. 
Graphically, envfit returns the plot I want but the orientation of these 
vectors are build under the opposite hypothesis that environmental variables 
are the dependent table.
Maybe a manual solution for my need is to build a list of centered vectors each 
of which orientated upon the correlation between environmental variables and 
the ordination scores
best
paolo



Da: Jari Oksanen 
Inviato: giovedì 17 ottobre 2013 9.32
A: Paolo Piras
Cc: r-sig-ecology@r-project.org
Oggetto: Re: [R-sig-eco] envfit() in vegan

On 17/10/2013, at 02:49 AM, Paolo Piras wrote:

> Dear list,
> I write you because I do not understand the behavior of envfit() in vegan.
> Basically, it takes a matrix coming from an ordination procedure and it fits 
> on it another matrix  (often an environmental matrix).
> The projections of points onto vectors have maximum correlation with 
> corresponding environmental variables.
>
> A permutation test is associated to this procedure and it basically performs 
> a series of correlations between any column in the environmental matrix and 
> the ordnation matrix.
> Maybe my question is trivial (or simply ...wrong) but..intuitively, this 
> should return the same results found from a series of separate multivariate 
> regressions between any single column in the environmental matrix and the 
> entire ordination matrix.
> However it is not the case, being the envfit() results much more liberal when 
> compared to regression (i.e. using rda) and the r2 are drastically larger 
> than R-sq from rda.
> I suspect that the metric undergoing the permutation test of significance in 
> envfit() that is squared correlation coefficient (r^2) does not correspond to 
> the R-sq calculated using rda.
>
Paolo,

I am afraid I cannot quite understand your problems. A reproducible example 
with some numbers could be useful.

I did not quite catch your comparison of RDA and envfit. They are quite 
different methods, and their R2's really are for different things (but with 
special tricks these things can be made similar). In RDA, the R2 tells how well 
the ordination predicts the species abundances, and in envfit() the R2 tells 
how well the ordination predicts the environmental variables. For a basic and 
normal usage of RDA let us compare the following cases:

library(vegan)
data(varespec, varechem)
mod <- rda(varespec ~ Al + P + K, varechem)
## gives unadjusted R2=0.377
envfit(mod ~ Al + P + K, varechem, display="lc", choices=1:3)
## **should** give for all vars r2=1 because they were the constraints

Cheers, Jari Oksanen



___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Comparing results of two CCAs

2014-03-14 Thread Paolo Piras
Hi,
maybe partial least squares:

you can run two separate partial least squares analyses and then comparing 
vectors. 

best
paolo

Da: r-sig-ecology-boun...@r-project.org  
per conto di Eliot Miller 
Inviato: venerdì 14 marzo 2014 05.50
A: r-sig-ecology@r-project.org
Oggetto: [R-sig-eco] Comparing results of two CCAs

I have four datasets: morphological measurements for a set of species (M1),
ecological measurements for the same set of species (E1), morphological
measurements for a second set of species (M2), and ecological measurements
for this second set of species (E2).

I am interested in finding the linear combinations of variables between M1
and E1, and between M2 and E2. That is, I'd like to know what combinations
of morphological measurements are associated with what combination of
ecological measurements--for each set of species separately. This seems
like a good use of CCA (two separate CCAs).

But here's where things get tricky for me. I'd like to see whether the same
linear combinations from one set of species do a good job of explaining the
variation in the second set of matrices. And I'd like to see how they
differ, if possible...e.g. yes the canonical function from the first CCA
does explain some of the variation in the second, but a different function
could do a lot better.

Is this making any sense? I could see simply running these as two separate
CCAs, then comparing the results qualitatively. But that doesn't seem very
rigorous. Should I be considering some other approach entirely?

Thanks for any input!

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Comparing results of two CCAs

2014-03-14 Thread Paolo Piras
PLS can be performed in pls package while varpart in vegan package

however...could you explain a little bit better the specific  hypothesis you 
want to test?


Different methods are suited in dependence of the explicit hypothesis you set.











Da: eliot.is...@gmail.com  per conto di Eliot Miller 

Inviato: venerd? 14 marzo 2014 15.19
A: Paolo Piras; highs...@highstat.com
Cc: r-sig-ecology@r-project.org
Oggetto: Re: [R-sig-eco] Comparing results of two CCAs

The partial least squares sounds really promising, thanks. I now need to go 
read about and try some tests with it. If you or anyone else has a preferred 
implementation of this in R I'd be interested in hearing about it!

Alain--can you elaborate on how I might be able to use variance partitioning? I 
haven't used either of these methods before, but reading about it it sounds 
intended to quantify the amounts of variation in a single matrix explained by 
multiple matrices. I'm probably missing something. If you could explain more 
I'd be very interested.

Thanks for your help!
Eliot


On Fri, Mar 14, 2014 at 2:16 AM, Paolo Piras 
mailto:paolo.pi...@uniroma3.it>> wrote:
Hi,
maybe partial least squares:

you can run two separate partial least squares analyses and then comparing 
vectors.

best
paolo

Da: 
r-sig-ecology-boun...@r-project.org<mailto:r-sig-ecology-boun...@r-project.org> 
mailto:r-sig-ecology-boun...@r-project.org>>
 per conto di Eliot Miller mailto:eliotmil...@umsl.edu>>
Inviato: venerd? 14 marzo 2014 05.50
A: r-sig-ecology@r-project.org<mailto:r-sig-ecology@r-project.org>
Oggetto: [R-sig-eco] Comparing results of two CCAs

I have four datasets: morphological measurements for a set of species (M1),
ecological measurements for the same set of species (E1), morphological
measurements for a second set of species (M2), and ecological measurements
for this second set of species (E2).

I am interested in finding the linear combinations of variables between M1
and E1, and between M2 and E2. That is, I'd like to know what combinations
of morphological measurements are associated with what combination of
ecological measurements--for each set of species separately. This seems
like a good use of CCA (two separate CCAs).

But here's where things get tricky for me. I'd like to see whether the same
linear combinations from one set of species do a good job of explaining the
variation in the second set of matrices. And I'd like to see how they
differ, if possible...e.g. yes the canonical function from the first CCA
does explain some of the variation in the second, but a different function
could do a lot better.

Is this making any sense? I could see simply running these as two separate
CCAs, then comparing the results qualitatively. But that doesn't seem very
rigorous. Should I be considering some other approach entirely?

Thanks for any input!

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org<mailto:R-sig-ecology@r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology




[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Comparing results of two CCAs

2014-03-14 Thread Paolo Piras



​If the block of ecological variables for the first morphological group 
contains the same TYPE of variables ( i.e. temperature, humidity and other 
stuff) of the ecological block of variables related to the second morphological 
group you can just work with regresssion after checking for collinearity among 
predictors (do a PCA if you find high VIF); PLS can handle collinearities.

In this case, the  ecology is treated as the independent and morphology as the 
dependent (take a look to this:

http://www.ncbi.nlm.nih.gov/pubmed/20656037​

to discriminate between PLS regression and PLS correlation, being the first 
asymmetrical, the second symmetrical)

In this case you can run a MANCOVA with morphology as multivariate Y, ecology 
as multiple X (i.e. a meaningful number of PLS scores or PCA scores or the 
original variables)  with "radiation" as factor variable. As I doubt these data 
can respect parametric assumptions you can run adonis() that is non-parametric.


BUT (I write this even if it seems to me that it is not the case)  ...if  the 
ecological variables related to  the SECOND morphological group are not of the 
same TYPE of the ecological variables related to  the FIRST morphological group 
.things are a little bit more complicated: ASSUMING THAT MORPHOLOGY IS 
REPRESENTED BY THE SAME TYPE OF VARIABLES. you can extract vectors of two 
separate PLS and then relate them to check if they covary; in this case 
however, I expect a covariance between the ecological variables related to  the 
FIRST morphological group and those related to the FIRST morphological group.


The various tests can be much more complex however.

best

paolo






Da: eliot.is...@gmail.com  per conto di Eliot Miller 

Inviato: venerdì 14 marzo 2014 17.57
A: Paolo Piras
Cc: highs...@highstat.com; r-sig-ecology@r-project.org
Oggetto: Re: [R-sig-eco] Comparing results of two CCAs

Sure, thanks for the chance.

I am interested in whether two separate evolutionary radiations have followed 
the same ecomorphological trajectory. Are the same morphological features 
associated with the same ecological features? I think so, but I also think in 
one of the radiations that the group is doing more ecologically with a more 
conserved (less variable) morphology. In other words, increases along certain 
morphological axes correspond to the same ecologies in both datasets, but 
smaller morphological changes in one dataset are associated with equally large 
changes in ecology. I want a method that can get at that.

Cheers,
Eliot


On Fri, Mar 14, 2014 at 11:02 AM, Paolo Piras 
mailto:paolo.pi...@uniroma3.it>> wrote:

PLS can be performed in pls package while varpart in vegan package

however...could you explain a little bit better the specific  hypothesis you 
want to test?


Different methods are suited in dependence of the explicit hypothesis you set.











Da: eliot.is...@gmail.com<mailto:eliot.is...@gmail.com> 
mailto:eliot.is...@gmail.com>> per conto di Eliot Miller 
mailto:eliotmil...@umsl.edu>>
Inviato: venerdì 14 marzo 2014 15.19
A: Paolo Piras; highs...@highstat.com<mailto:highs...@highstat.com>
Cc: r-sig-ecology@r-project.org<mailto:r-sig-ecology@r-project.org>
Oggetto: Re: [R-sig-eco] Comparing results of two CCAs

The partial least squares sounds really promising, thanks. I now need to go 
read about and try some tests with it. If you or anyone else has a preferred 
implementation of this in R I'd be interested in hearing about it!

Alain--can you elaborate on how I might be able to use variance partitioning? I 
haven't used either of these methods before, but reading about it it sounds 
intended to quantify the amounts of variation in a single matrix explained by 
multiple matrices. I'm probably missing something. If you could explain more 
I'd be very interested.

Thanks for your help!
Eliot


On Fri, Mar 14, 2014 at 2:16 AM, Paolo Piras 
mailto:paolo.pi...@uniroma3.it>> wrote:
Hi,
maybe partial least squares:

you can run two separate partial least squares analyses and then comparing 
vectors.

best
paolo

Da: 
r-sig-ecology-boun...@r-project.org<mailto:r-sig-ecology-boun...@r-project.org> 
mailto:r-sig-ecology-boun...@r-project.org>>
 per conto di Eliot Miller mailto:eliotmil...@umsl.edu>>
Inviato: venerdì 14 marzo 2014 05.50
A: r-sig-ecology@r-project.org<mailto:r-sig-ecology@r-project.org>
Oggetto: [R-sig-eco] Comparing results of two CCAs

I have four datasets: morphological measurements for a set of species (M1),
ecological measurements for the same set of species (E1), morphological
measurements for a second set of species (M2), and ecological measurements
for this second set of species (E2).

I am interested in finding the linear combinations of variables between M1
and E1, and between M2 and E2. Th

Re: [R-sig-eco] correlation between dissimilarity matrices

2014-05-21 Thread Paolo Piras
Hi Carlos
Very briefly...
you could look at rda() in vegan (not that in calibrate)
partial and constrianed rda seems to be appropriate for your case.
Maybe you should code a bit for controlling your nested stratification variable 
even if it is not very clear to me the nature of the data (sites vs location)
I mean.. how exactly they are structured?
best
paolo




Da: r-sig-ecology-boun...@r-project.org  
per conto di Carlos 
Inviato: mercoledì 21 maggio 2014 20.57
A: r-sig-ecology@r-project.org
Oggetto: [R-sig-eco] correlation between dissimilarity matrices

Hello, I am working with two dissimilarity matrices containing
dissimilarities in taxonomic community structure and environmental
variables, respectively, between different sites. Those sites are grouped in
three different locations. I know I can obtain the correlation between both
matices by using a Mantel test. However, I would also like to know the
correlation between both matrices after removing the effect of the
dissimilarities between locations, i.e. only considering the dissimilarties
within locations. How could I do it?

Thank you very much,

Carlos



--
View this message in context: 
http://r-sig-ecology.471788.n2.nabble.com/correlation-between-dissimilarity-matrices-tp7578910.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] draw 95% confidence limits for non significant regression lines

2014-10-29 Thread Paolo Piras
Dear list,
I write for a surely trivial doubt about plotting 95% CI of regression lines. 
I saw that someone draw them even for non significant regression lines. I think 
that this is not correct 
as , in the majority of cases, Ho is that beta is not significantly different 
from 0 and consequently the observed beta is just due to chance.  
On the other hand one could argue that 95% CI limits are still informative 
about the distribution of the data. 

Thanks in advance for an opinion.
regards
paolo
___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] multivariate segmented regresion

2015-04-23 Thread Paolo Piras
Hi folks,
I write to the list in to ask if someone knows if exists the possibility to 
perform a segmented multivariate  regression (with multivariate response) 
similar to what we can find in the "segmented" package that handles only 
univariate response. 
Doing it by hand would imply to perform a log-lik ratio test between a series 
of submodels. Unfortunately (both in "lmtest" package and in "epicalc") 
lrtest() does not work on models with multivariate responses.

Does anyone have some suggestion for this issue?
Thanks in advance
paolo

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] 3d box plot

2015-11-08 Thread Paolo Piras
Hi folks,
anyone could address me towards a R function/package able to do a 3d boxplot 
similar to

http://158.132.155.107/oess/POSH/StatSoft/popups/popup125.gif

Thanks in advance
best
paolo

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] 3d box plot

2015-11-10 Thread Paolo Piras
Thanks to all who answered to my question; I found your comments very useful;

another option could be

http://www.cpwardell.com/2015/08/28/legoplots-in-r-3d-barplots-in-r/


My original purpose was to plot boxplots by groups for more than a variables 
(as the comment below does) at different times (the third dimension)


best

paolo




Da: Jeremy Chacon 
Inviato: luned� 9 novembre 2015 16.21
A: Paolo Piras
Cc: R-SIG list; r-sig-ecology@r-project.org
Oggetto: Re: [R-sig-eco] 3d box plot

This doesn't directly answer your question, but I would recommend just using a 
2d boxplot grouped by the variables. I personally find the 3d one very 
difficult to read. What about something like this, using ggplot2?

library(ggplot2)

fakeData = c(rnorm(10,1,2), rnorm(10,2,2),rnorm(10,2,2),rnorm(10,3,2))
group1 = c(rep("A",20),rep("B",20))
group2 = rep(c("X","Y"), 20)

df = data.frame(group1,group2, fakeData)
ggplot(df, aes(x = group1, y = fakeData, color = group2))+
  geom_boxplot()

On Sun, Nov 8, 2015 at 5:11 AM, Paolo Piras 
mailto:paolo.pi...@uniroma3.it>> wrote:
Hi folks,
anyone could address me towards a R function/package able to do a 3d boxplot 
similar to

http://158.132.155.107/oess/POSH/StatSoft/popups/popup125.gif

Thanks in advance
best
paolo

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org<mailto:R-sig-ecology@r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
___

Jeremy M. Chacon, Ph.D.

Post-Doctoral Associate, Harcombe Lab
University of Minnesota
Ecology, Evolution and Behavior


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

[R-sig-eco] 3d fitting plane

2016-01-19 Thread Paolo Piras
Hi folks,
I look for a fast way to estimate a 3d fitting plane to my 3d data. 
I do not want z~y+x as this is a regression model. 
I just want the equation of the best plane that fits the data in 3d. Maybe 
using princomp() and Total least squares?
Looking around I found some solutions but nothing definitive.
Thanks in advance for any suggestion. 
best
paolo

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] 3d fitting plane

2016-01-19 Thread Paolo Piras

I tried using prcomp():

library(compositions)
library(rgl)
x <- rnorm(100)
y <- rnorm(100)
z <- rnorm(100)
mat<-cbind(x,y,z)
plot3D(mat,col=3,bbox=F)
pr<-prcomp(mat)
planes3d(pr$rotation[3,1]*sign(pr$rotation[3,1]),pr$rotation[3,2]*sign(pr$rotation[3,2]),pr$rotation[3,3]*sign(pr$rotation[3,3]),alpha=0.5,col=3,bbox=F)
decorate3d()

It seems fine; any advice is welcome
best
paolo



Da: R-sig-ecology  per conto di Paolo 
Piras 
Inviato: martedì 19 gennaio 2016 14.46
A: r-sig-ecology@r-project.org
Oggetto: [R-sig-eco] 3d fitting plane

Hi folks,
I look for a fast way to estimate a 3d fitting plane to my 3d data.
I do not want z~y+x as this is a regression model.
I just want the equation of the best plane that fits the data in 3d. Maybe 
using princomp() and Total least squares?
Looking around I found some solutions but nothing definitive.
Thanks in advance for any suggestion.
best
paolo

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Complete lecture Multivariate Statistics freely available

2017-01-27 Thread Paolo Piras
Dear Ralf,

this is a VERY useful initiative for everyone interested in teaching (and 
always learning...)

Thanks **a lot** for sharing

All the best

Paolo





Da: R-sig-ecology  per conto di Ralf 
Sch�fer 
Inviato: venerd� 27 gennaio 2017 11.35
A: r-sig-ecology@r-project.org
Oggetto: [R-sig-eco] Complete lecture Multivariate Statistics freely available

Dear all,

whoever is interested, we provide teaching videos and R scripts for a lecture 
on multivariate analysis in R for environmental scientists.
The material is available here:
https://www.uni-koblenz-landau.de/en/campus-landau/faculty7/environmental-sciences/landscape-ecology/Teaching/r-statistics
Statistics and R - University of Koblenz � 
Landau
www.uni-koblenz-landau.de
Lecture "Applied Multivariate Statistics" 2016/2017. To enable (1) studying 
from home, (2) watching the lectures again at a later stage (e.g. preparation 
for the exam ...




Course content:

Introduction; Revisiting univariate statistics from a data modelling perspective
Multiple regression analysis: Modelling strategies and methods, LASSO
Generalized linear models
Introduction to multivariate analysis; Ordination: Principal Component Analysis 
(PCA)
Multivariate multiple Regression (Redundancy Analysis - RDA); Similarity and 
distance metrics; Non-metric multidimensional scaling (NMDS)
Multivariate comparison of groups (Hotelling T2, MANOVA, PERMANOVA)
Unsupervised classification (Cluster analysis)
Supervised classification (Classification and regression trees)

Feel free to provide comments etc to improve the course

Best regards
Ralf

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
R-sig-ecology Info Page - ETH 
Zurich
stat.ethz.ch
R-sig-ecology -- R for use in ecological and environmental data analysis About 
R-sig-ecology



[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

[R-sig-eco] test for differences between effect sizes

2017-03-22 Thread Paolo Piras
Hi folks,

I write in order to ask your opinion about the best strategy to test for 
differences between two effect sizes coming, for example, from two different 
one-way anovas designs that uses different independents variables while keeping 
the same two-levels factor variable. For example I would like to assess if the 
significant differences between two levels that I found for  two differents 
measures are different between them or not. I have in mind some solutions 
(permuting z-scores, etc) but maybe there are already better ad-hoc solutions.

Thanks in advance for any advice

Best

paolo






[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] test for differences between effect sizes

2017-03-22 Thread Paolo Piras
Yes of course,

actually I asked for an R solution; packages or specific functions

bur evidently I have not been clear

in any case thanks for your answer

regards

paolo





Da: Sarah Goslee 
Inviato: mercoled� 22 marzo 2017 21:28
A: Paolo Piras
Cc: r-sig-ecology@r-project.org
Oggetto: Re: [R-sig-eco] test for differences between effect sizes

Hi Paolo,

This list isn't really for asking pure statistics questions, but for R
applications in ecology. Your question is better addressed to a local
stats consultant, or to stackoverflow.

Sarah

On Wed, Mar 22, 2017 at 2:40 PM, Paolo Piras  wrote:
> Hi folks,
>
> I write in order to ask your opinion about the best strategy to test for 
> differences between two effect sizes coming, for example, from two different 
> one-way anovas designs that uses different independents variables while 
> keeping the same two-levels factor variable. For example I would like to 
> assess if the significant differences between two levels that I found for  
> two differents measures are different between them or not. I have in mind 
> some solutions (permuting z-scores, etc) but maybe there are already better 
> ad-hoc solutions.
>
> Thanks in advance for any advice
>
> Best
>
> paolo
>
>
>
>
>

--
Sarah Goslee
http://www.functionaldiversity.org
Functional Diversity<http://www.functionaldiversity.org/>
www.functionaldiversity.org
Welcome to FunctionalDiversity.org This webpage has two goals: to discuss ideas 
and tools related to the study of ecosystem function, community assembly and 
community ...




[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology