A. Modul
Unduh modul klik disini
B. Script
Deskripsi Data
nilai = data_mk$Nilai
summary(nilai)
visualisasi <- function(x){
par(mfrow = c(2,2))
hist(x, main="Nilai MK", ylab="frekuensi", xlab=“nilai")
plot(x, type= "l", main="Nilai MK", ylab="Nilai", xlab="Mahasiswa")
pie(table(x), main="Pie Chart Nilai MK")
boxplot(x, main="Box Plot Nilai MK")
stem(x)
}
visualisasi(nilai)
Uji Perbandingan
t.test(x = data_perbandingan$Sebelum, y = data_perbandingan$Setelah, alternative = "two.sided", mu = 0, paired = TRUE, var.equal = FALSE, conf.level = 0.95)
Analisis Variansi
model1 = aov(Penjualan ~ Pemasaran, data_anova)
summary(model1)
Analisis Regresi
model2 = lm(data_regresi)summary(model2)
Analisis Cluster
data = dist(data_cluster, method = "euclidean")fit = hclust(data)plot(fit)rect.hclust(fit, k=3, border="red")
Analisis Biplot
pca1 = princomp(data_biplot)biplot(pca1)
Auto ARIMA
install.packages("forecast")install.packages("lmtest")library(forecast)library(lmtest)model_adw = auto.arima(data_arima, trace=TRUE)coeftest(model_adw)tsdiag(model_adw)plot(forecast(model_adw))
Exponential Smoothing
install.packages("fpp2")library(fpp2)
mod1 <- ses(data_es[,1])accuracy(mod1)autoplot(mod1)mod2 <- holt(data_es[,1])accuracy(mod2)autoplot(mod2)mod3 <- ets(data_es[,1])accuracy(mod3)autoplot(forecast(mod3))
0 Response to "Modul dan Script [Pelatihan R]"
Post a Comment