micresh / data-analytics-2019-KubSTU

0 stars 2 forks source link

LR-1 #5

Open micresh opened 5 years ago

micresh commented 5 years ago

lr1-rlab.pdf

micresh commented 5 years ago

https://github.com/micresh/data-analytics-2019-KubSTU/blob/master/lr1/train.csv

NataliaVl commented 5 years ago
library("psych")# описательные статистики
library("lmtest") # тестирование гипотез в линейных моделях
library("ggplot2")# графики
library("dplyr") # манипуляции с данными
library("MASS") # подгонка распределений
#
dt <- train2 

#
help(dt) 

#
m <- median(dt$Pclass, na.rm = T)
m

#
res1 <- 8
res2 <- 3
res3 <- 0
if(res1 == m) {re1 <- 0}
if(res1 <= m){re1 <- -1}
if(res1 >= m){re1 <- 1}
re1

#
describe(dt$Pclass)

#
qplot(data = dt, Pclass, xlab = "Pclass", ylab = "number of people flying in the Pclass", main = "data for flights in the Pclass")

hist(dt$Pclass, probability = TRUE, col="grey")
NataliaVl commented 5 years ago

ЛАБОРАТОРНАЯ 1.docx