当前位置:网站首页>R language Quantitative Ecology redundancy analysis RDA analysis plant diversity species data visualization

R language Quantitative Ecology redundancy analysis RDA analysis plant diversity species data visualization

2022-06-24 18:23:00 Extension end tecdat

Link to the original text :http://tecdat.cn/?p=25564 

Redundancy analysis (redundancy analysis,RDA) It is a ranking method of regression analysis combined with principal component analysis , It's also a multiple dependent variable (multiresponse) Expansion of regression analysis . conceptually ,RDA It is the of the fitting value matrix of multiple linear regression between the dependent variable matrix and the explanatory variable PCA analysis .

This report analyzes the data of plant ecological diversity .
 

Redundancy analysis

First , Load data .

To load data , All files must be in the working directory .

ste <- read.csv("sr.csv")
ev <- read.csv("ev.csv")
as <- read.csv("as.csv")

I made some changes to the data . First , I will  ev  All quantitative variables of the data ( That is, all variables except geomorphic units ) And  as  The data is combined into one called  enqut. then , I normalized the data ,  Allow comparisons between variables in very different units . Last , I added the geomorphic unit column to the normalized quantitative environmental variables , Create a data frame  era, For redundancy analysis .

enqut<- cbind(ev\[,-5\],ap)
enz <- scale
ut <- env\[,5\]
era<- data.frame

Structural data

I use environmental data era  As an explanatory variable, the redundancy analysis of vegetation structure is carried out . I assign results to objects  str.

summary(str)

 

 

 

 

Then I got the of this analysis R Square and adjusted R Fang .

RsquareAdj

RsqeAdj$adj.r.sqd

  Make a three sequence diagram .

par
plot
points
usc <- scores
points
text

Composition data

First, I loaded the species data . Again , This document  PAl.csv  Must be in the working directory . In order to reduce the importance of large abundance , I will Hellinger The transformation is applied to species data .

sp <- Hellinger(sp)

Then I used all environmental variables as explanatory variables for redundancy analysis .

head(suda)

 

#   get R^2 And adjusted R^2
(sR2 <- RseAdj

(spdj <- RseAdj$adj.r.sed)

With 2 Type ruler Making data on species RDA Three order graph .

#  Do a good job in the drawing space 
par
plot
#  Draw the score of the site 
spc <- scores
points

#  Draw the number of species 
ssc <- scores
points

#  Draw arrows for quantitative explanatory variables and their labels 
spesc <- scores
arrows
env.names 
text

#  Draw the center points of geomorphic units and their labels 
spsc <- scores
points
text

Paper graphics

This is the code for making graphics for the paper .

par
ensc <- scores
arrows
points

#  Make drawing space 
par
plot
abline
mtext

#  Draw the score of the site 
spsc <- scores
points

#  Draw the number of species 
sp.sc <- scores
points

#  Draw arrows for quantitative explanatory variables and their labels 
spsc <- scores
arrows
text

#  Draw the center points of geomorphic units and their labels 
unimes 
spusc <- scores
points
text


The most popular insights

1.matlab Partial least squares regression (PLSR) And principal component regression (PCR) And principal component regression (PCR)")

2.R The principal components of language high dimensional data pca、 t-SNE Algorithm dimension reduction and visual analysis

3. Principal component analysis (PCA) Basic principles and analysis examples Basic principles and analysis examples ")

4. be based on R Language implementation LASSO regression analysis

5. Use LASSO Regression prediction of stock return data analysis

6.r In language lasso Return to ,ridge Ridge return and elastic-net Model

7.r Partial least squares regression in language pls-da Data analysis

8.r Partial least squares in language pls Regression algorithm

9.R Language linear discriminant analysis (LDA), Second discriminant analysis (QDA) And regular discriminant analysis (RDA)

原网站

版权声明
本文为[Extension end tecdat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202211340445451.html