forum.wfido.ru  

Вернуться   forum.wfido.ru > Прочие эхи > SU.OS2

 
 
Опции темы Опции просмотра
  #1  
Старый 30.06.2017, 15:16
John Zaicev
Guest
 
Сообщений: n/a
По умолчанию На каком языке этот код?

John Zaicev написал(а) к All в Jun 17 14:39:15 по местному времени:

[√] Приветствую, All !

library(xtable)
library(openintro)
data(marioKart)
toss <- which(marioKart$totalPr > 80)
keep <- c("totalPr", "cond", "stockPhoto", "duration", "wheels", "shipSp")
d <- marioKart[-toss, keep]
d$stockPhoto <- (d$stockPhoto == "yes") + 0
d$cond <- (d$cond == "new") + 0
thisOne <- names(d) == "cond"
names(d)[thisOne] <- "condNew"
d$shipSp <- as.character(d$shipSp)
these <- d$shipSp %in% c("firstClass", "priority", "parcel", "media")
d$shipSp[these] <- "usps"
these <- d$shipSp %in% c("ups3Day", "upsGround")
d$shipSp[these] <- "ups"
these <- d$shipSp %in% c("other", "standard")
d$shipSp[these] <- "unknown"
d$shipSp <- as.factor(d$shipSp)
d <- d[,-which(colnames(d) == "shipSp")]

summary(lm(totalPr ~ ., d))
summary(lm(totalPr ~ condNew + stockPhoto + duration + wheels, d))
xtable(summary(lm(totalPr ~ condNew + stockPhoto + wheels, d)))
xtable(summary(fit <- lm(totalPr ~ condNew + wheels, d)))


fit1 <- lm(totalPr ~ duration + cond + stockPhoto + wheels, d)
fit2 <- lm(totalPr ~ cond + stockPhoto + wheels, d)
anova(fit1, fit2)

fit1 <- lm(totalPr ~ cond + stockPhoto, d)
fit2 <- lm(totalPr ~ stockPhoto, d)
anova(fit1, fit2)

Вроде бы ничего не забыл...
[√] До скорого, All !

▌║▐║│║▌║││║║ /http://adf.ly/1Y63НZ/
2║5080▌244║0 /P2Pirates@Mail.ru_/ _DreamLand laboratory

--- Моему первому компьютеру 9371 день (или 302 месяца)
Ответить с цитированием
 


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


Текущее время: 19:50. Часовой пояс GMT +4.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc. Перевод: zCarot