У нас вы можете посмотреть бесплатно How to create a normal Q-Q plot in R using ggplot2? | StatswithR | Arnab Hazra или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Here we explain how to generate a presentation/publication-quality normal Q-Q plot in R/R-studio using ggplot2. The codes for the steps explained in the video are as follows. Copy and paste them into R, run them one-by-one and try to understand what each argument is doing. #datascience #datavisualization #visualization #ggplot2 #tidyverse #qqplot #rstudio #rcoding #normal Step 0a: If you don't know how to load data into R, simulate a vector X using X = rnorm(1e4, mean = 175, sd = 10) Step 0b: if you have not installed the packages ggplot2 and qqplotr, run install.packages("ggplot2") library(ggplot2) install.packages("qqplotr") library(qqplotr) Step 1: ggplot(mapping = aes(sample = X)) + stat_qq_point(size = 2) Step 2: ggplot(mapping = aes(sample = X)) + stat_qq_point(size = 2) + xlab("Theoretical Quantiles") + ylab("Sample Quantiles") Step 3: ggplot(mapping = aes(sample = X)) + stat_qq_point(size = 2) + stat_qq_line() + xlab("Theoretical Quantiles") + ylab("Sample Quantiles") Step 4: ggplot(mapping = aes(sample = X)) + stat_qq_band() + stat_qq_point(size = 2) + stat_qq_line() + xlab("Theoretical Quantiles") + ylab("Sample Quantiles") Step 5: ggplot(mapping = aes(sample = X)) + stat_qq_band() + stat_qq_point(size = 2) + stat_qq_line() + xlab("Theoretical Quantiles") + ylab("Sample Quantiles") + ggtitle("Normal Q-Q plot of heights") Step 6: ggplot(mapping = aes(sample = X)) + stat_qq_band() + stat_qq_point(size = 2) + stat_qq_line() + xlab("Theoretical Quantiles") + ylab("Sample Quantiles") + ggtitle("Normal Q-Q plot of heights") + theme(plot.title = element_text(hjust = 0.5)) Step 7: ggplot(mapping = aes(sample = X)) + stat_qq_band() + stat_qq_point(size = 2) + stat_qq_line() + xlab("Theoretical Quantiles") + ylab("Sample Quantiles") + ggtitle("Normal Q-Q plot of heights") + theme(plot.title = element_text(hjust = 0.5)) + theme(axis.text=element_text(size=20), axis.title=element_text(size=20), plot.title = element_text(size=20))