Open micresh opened 5 years ago
m1<-read.csv("D:/s1.csv", sep = ",") install.packages("ggplot2") library("ggplot2") View("m1") x<-m1$R10 y<-m1$R100 qplot(x, y, data = m1) ggplot() + geom_point(aes(x, y), size = 2) + theme_bw(base_size = 18) + xlab("50%") + ylab("100%") + labs(title = "Уровень артериального давления(Blood pressure rate)")
s1<-lm(data = m1, x~y) s1[["coefficients"]] s1$coefficients s1$residuals[1:10] options(digits =3) summary(s1) qplot(data = s1, x, y)+ stat_smooth(method = "lm", level = 0.95) + theme_bw(base_size =12) confint(s1, level =0.95) fitted(s1) s2<-deviance(s1) s3<-sum((y-mean(y))^2) s4<-data.frame(y=c(40, 60)) predict(s1,s4)
ss<-swiss cor(swiss) library("sjPlot") sjp.corr(s) library("GGally") install.packages("GGally") library("GGally") s<-swiss cor(swiss) install.packages("sjPlot") library("sjPlot") sjp.corr(s) install.packages("GGally") library("GGally") ggpairs(s) ss5<-lm(data = s, Fertility~Agriculture+Education+Catholic) lm(formula = Fertility ~ Agriculture + Education + Catholic,data = s)[](url)
https://github.com/micresh/data-analytics-2019-KubSTU/blob/master/lr2/lr2-rlab-ready.pdf