biplot with most important species

classic Classic list List threaded Threaded
4 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

biplot with most important species

Bjorn Tytgat
Hi all,

there might be a simple solution to do this, but I don't seem to manage
to find it. I have done a PCA using vegan. I now want to create a biplot
with only those species that explain a certain (cumulative) amount of
the variation along the first 2 PC axes (in order to keep things clear).
How could this be done?

Thanks in advance!

Kind regards,

Bjorn

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: biplot with most important species

stephen sefick
Hi Bjorn,

I have done this in the past using ggplot2. I think that I plotted
everything, but only labeled those that were above some threshold. In other
words, I changed the label in the input data to "". I think that is how I
solved this problem.
HTH,

Stephen

On Wed, Oct 12, 2016 at 5:44 AM, Bjorn <[hidden email]> wrote:

> Hi all,
>
> there might be a simple solution to do this, but I don't seem to manage to
> find it. I have done a PCA using vegan. I now want to create a biplot with
> only those species that explain a certain (cumulative) amount of the
> variation along the first 2 PC axes (in order to keep things clear). How
> could this be done?
>
> Thanks in advance!
>
> Kind regards,
>
> Bjorn
>
> _______________________________________________
> R-sig-ecology mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>



--
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
problems of being mammals.

                                -K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

                              -Robert Gentleman

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: biplot with most important species

syrovat
In reply to this post by Bjorn Tytgat
Hi Bjorn,

A common practice in simplifying ordinatin plots is to keep species that
show the best fit into the ordination space.
The position of such species in the ordination diagram really (may) tell
something.
In linear methods like PCA a linear fit is suitable. This can be
computed using vegan::envfit function.

For this I have a very simple function reduce.pca, which you can source
using this line of code:
source(url("http://vitsyrovatka.info/lib/exe/fetch.php?media=zpradat:functions:reduce.pca.r"))

The code and example may be viewed here (skip the Czech introduction):
http://vitsyrovatka.info/doku.php?id=zpradat:cs:fun:reducepca

Your criterion on species selection is more complicated. You can change
the function accordingly.
I am not completely sure but a solution might be multiplying species fit
by species variance,
then ordering species acoording to this fit*variance and add species
until the desired variance is achieved.
I might be wrong, anybody feel free to correct me, please.

Cheers,
Vit


Dne 2016-10-12 12:44, Bjorn napsal:

> Hi all,
>
> there might be a simple solution to do this, but I don't seem to
> manage to find it. I have done a PCA using vegan. I now want to create
> a biplot with only those species that explain a certain (cumulative)
> amount of the variation along the first 2 PC axes (in order to keep
> things clear). How could this be done?
>
> Thanks in advance!
>
> Kind regards,
>
> Bjorn
>
> _______________________________________________
> R-sig-ecology mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: biplot with most important species

Vitor
In reply to this post by Bjorn Tytgat
Do you know how to fix this error? It hapens when I try to get the raster
and convert do ASC (because it is a maxent demand)

>bio1 <- "D:/biorecortadobrasil/biobio1.tif"
>bio1
>stackbios <- stack(bio1) #stackeando os arquivos
>rasterstackbios <- raster(stackbios)
>agregrasterstackbios <- aggregate(rasterstackbios, fact=2)  ## By default
aggregates using mean, but see fun=
>writeRaster(agregrasterstackbios, "D:/biorecortadobrasil/asc/outfile.asc",
format="ascii", overwrite=TRUE)

Warning message:In .local(x, filename, ...) : all cell values are NA




2016-10-12 4:44 GMT-06:00 Bjorn <[hidden email]>:

> Hi all,
>
> there might be a simple solution to do this, but I don't seem to manage to
> find it. I have done a PCA using vegan. I now want to create a biplot with
> only those species that explain a certain (cumulative) amount of the
> variation along the first 2 PC axes (in order to keep things clear). How
> could this be done?
>
> Thanks in advance!
>
> Kind regards,
>
> Bjorn
>
> _______________________________________________
> R-sig-ecology mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Loading...