Make a flowchart
Posted: Mon Jul 11, 2022 11:17 am
Make a flowchart
data = read.csv(file.choose(), header = TRUE) # Scatterplot attach(data) summary(data) plot(x, y) boxplot(x, y) Im.out=Im(y-x) detach(data) # Pearson correlation # Pearson correlation raw data attach(data) cor.test(x,y) detach(data) # Pearson correlation manually excluding High Leverage Point data_cleaned <- subset(data_correlation, y < value of y) attach(data_cleaned) plot(x, y) cor.test(x,y) detach(data_cleaned) # Classical robust correlations # Spearman correlation attach(data) cor.test(x,y, method="spearman") detach(data) # Kendall's tau attach(data) cor.test(x,y, method="kendall") detach(data) # Modern robust correlations library(WRS2) # Percentage bend correlation attach(data) pbcor(x,y) detach(data) # Winsorized correlation attach(data)
wincor(x,y) detach(data) # Robust methods without High Leverage Point attach(data_cleaned) cor.test(x,y) cor.test(x,y, method="spearman") cor.test(x,y, method="kendall") pbcor(x,y) wincor(x,y) detach(data_cleaned)
data = read.csv(file.choose(), header = TRUE) # Scatterplot attach(data) summary(data) plot(x, y) boxplot(x, y) Im.out=Im(y-x) detach(data) # Pearson correlation # Pearson correlation raw data attach(data) cor.test(x,y) detach(data) # Pearson correlation manually excluding High Leverage Point data_cleaned <- subset(data_correlation, y < value of y) attach(data_cleaned) plot(x, y) cor.test(x,y) detach(data_cleaned) # Classical robust correlations # Spearman correlation attach(data) cor.test(x,y, method="spearman") detach(data) # Kendall's tau attach(data) cor.test(x,y, method="kendall") detach(data) # Modern robust correlations library(WRS2) # Percentage bend correlation attach(data) pbcor(x,y) detach(data) # Winsorized correlation attach(data)
wincor(x,y) detach(data) # Robust methods without High Leverage Point attach(data_cleaned) cor.test(x,y) cor.test(x,y, method="spearman") cor.test(x,y, method="kendall") pbcor(x,y) wincor(x,y) detach(data_cleaned)