# input data
varian=read.table(file.choose(), header = TRUE)
View(varian)

# Uji Kesamaan varian
  library(car)
## Warning: package 'car' was built under R version 4.6.2
## Loading required package: carData
## Warning: package 'carData' was built under R version 4.6.2
  leveneTest(varian$Nilai, varian$Kelas)
## Warning in leveneTest.default(varian$Nilai, varian$Kelas): varian$Kelas coerced
## to factor.
## Levene's Test for Homogeneity of Variance (center = median)
##       Df F value Pr(>F)
## group  2  0.4267 0.6604
##       15
  library(lawstat)
## Warning: package 'lawstat' was built under R version 4.6.2
## 
## Attaching package: 'lawstat'
## The following object is masked from 'package:car':
## 
##     levene.test
  data(varian)
## Warning in data(varian): data set 'varian' not found
  levene.test(varian[,"Nilai"], varian[,"Kelas"], location = "median", correction.method = "zero.correction")
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median with modified structural zero removal method
##  and correction factor
## 
## data:  varian[, "Nilai"]
## Test Statistic = 0.4372, p-value = 0.6557
  levene.test(varian[,"Nilai"], varian[,"Kelas"], location = "mean", correction.method = "zero.correction")
## 
##  Classical Levene's test based on the absolute deviations from the mean
##  ( zero.correction not applied because the location is not set to median
##  )
## 
## data:  varian[, "Nilai"]
## Test Statistic = 0.64903, p-value = 0.5366