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.frameStructural 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 .
RsquareAdjRsqeAdj$adj.r.sqdMake a three sequence diagram .
par
plot
points
usc <- scores
points
textComposition 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
textPaper 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
textThe most popular insights
1.matlab Partial least squares regression (PLSR) And principal component regression (PCR) And principal component regression (PCR)")
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




