Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

LAMPIRAN 1

A. Data Penelitian

Variabel X 1 Variabel X 2 Variabel X 3 Variabel Y


Responden Soal 1 Soal 2 Soal 3 Soal 4 Soal 5 Soal 6 Soal 7 Soal 8
1 3 4 2 2 2 4 3 3
2 2 4 1 1 2 4 1 2
3 2 4 1 1 2 4 1 2
4 3 4 2 2 2 3 2 2
5 2 1 2 3 1 3 1 1
6 2 1 3 4 1 4 2 2
7 3 4 2 2 1 3 2 3
8 3 4 2 2 2 3 4 3
9 4 4 2 2 1 4 3 4
10 2 4 1 1 2 3 1 1
11 2 4 1 2 1 3 2 3
12 3 4 1 1 1 3 2 2
13 1 3 3 3 1 3 1 1
14 2 3 2 3 2 3 1 1
15 3 4 2 3 1 1 3 3
16 3 4 3 3 3 4 3 3
17 3 4 3 4 1 3 3 3
18 3 4 3 3 2 3 3 3
19 1 4 3 3 1 4 1 1
20 4 4 3 4 1 4 4 4
21 4 4 3 4 1 4 4 4
22 4 4 1 2 2 4 4 4
23 3 4 3 4 1 4 3 3
24 3 4 1 1 2 4 2 2
25 2 4 1 1 2 4 1 1
26 2 4 3 4 1 4 1 1
27 2 4 3 4 1 3 1 2
28 3 4 2 1 2 3 2 3
29 3 4 2 3 1 4 3 3
30 2 3 1 1 1 3 1 1
31 3 4 3 2 2 4 3 3
32 3 4 3 2 2 4 2 3
33 4 4 3 2 2 4 3 3
34 3 4 3 2 2 4 3 3
35 3 1 1 2 1 3 2 2
36 3 4 3 2 2 4 2 2
37 3 4 1 1 2 4 2 3
38 3 4 2 1 2 4 2 3
39 3 4 3 3 1 4 2 3
40 3 4 2 2 1 4 2 3
41 3 4 2 2 2 3 2 3
42 3 4 3 4 1 4 3 3
43 2 4 2 3 2 4 2 2
44 3 4 1 1 2 4 3 3
45 2 4 1 3 3 4 1 2
46 3 4 3 3 4 4 3 3
47 3 4 3 3 2 4 3 3
48 3 4 1 1 1 3 2 3
49 2 1 2 3 2 4 1 1
50 1 3 1 1 1 2 1 1

B. Program dan Output


1. Program

> Memasukkan Data


> library(readxl)
> Data <- read.csv("D:/semester akhir/skripsi/Data.csv")
> Data

> #Model Regresi Pendapatan Pedagang diPasar Ara Kecamatan


Bontobahari Kabupaten Bulukumba
> modelregresi<-lm(Y~X1+X2+X3, Data)
> summary(modelregresi)
> library(olsrr)
> ols_regress(modelregresi)

> #Uji Asumsi Klasik


> #Uji Normalitas
> library(stats)
> shapiro.test(modelregresi$residuals)

> #Uji Multikolineritas


> library(car)
> vif(modelregresi)

> #Uji Heterokedastisitas


> library(lmtest)
> bptest(modelregresi, studentized = F)

> #Uji Autokorelasi


> dwtest(modelregresi)

> #Grafik Uji Asumsi


> par (mfrow=(2,2))
> attributes(modelregresi)
> qqnorm(modelregresi$residuals)
> qqline(modelregresi$residuals)
> hist(modelregresi$residuals, prob=TRUE, xlab=”Residual”, main
=”Histogram of Residuals”)
> a←seq(min(modelregresi$residuals), max(modelregresi$residuals),
length = 40)
> b←dnorm(a,mean(modelregresi$residuals), sd(modelregresi$residual))
> lines(a, b, col = ”red”,lwd=2)
> plot(modelregresi$residuals~modelregresi$fitted.value, xlab =”Fitted
Values”, ylab=“Residual”, main=”Scatter Plot”)

> library(dplyr)
> plot(modelregresi4residuals~lag(modelregresi$residuals, 1), xlab=”Resi
dual(e-1)”, ylab =“Residual (e)”, main = “Residual Lag Plot”)

2. Output

You might also like