This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(car)
## Warning: package 'car' was built under R version 4.1.3
## Loading required package: carData
## Warning: package 'carData' was built under R version 4.1.3
DataMember <- read.csv("Data Fitnes.csv")
DataMember$grpMetode <- cut(DataMember$Metode,
breaks = c(0, 1, 2, 3, Inf),
labels = c("Mod-1","Mod-2","Mod-3","Mod-4"))
DataMember$grpUmur <- cut(DataMember$Metode,
breaks = c(0, 1, 2, Inf),
labels = c("<20","20-40",">40"))
# data diperoleh pada tanggal 21 juni 2022
head(DataMember)
## MemberName Berat Metode Umur grpMetode grpUmur
## 1 NUR MEI CHASANATI 5 1 1 Mod-1 <20
## 2 SUPRAPTO 4 1 1 Mod-1 <20
## 3 TITI PRIYONO 5 1 1 Mod-1 <20
## 4 SUSENO 5 1 2 Mod-1 <20
## 5 ALIP ASMADI 6 1 2 Mod-1 <20
## 6 IRAWAN EKOBOEDJO MARGONO 2 1 2 Mod-1 <20
AnovaModel1Arah <- lm(data = DataMember,
formula = Berat~grpUmur)
anova(AnovaModel1Arah)
## Analysis of Variance Table
##
## Response: Berat
## Df Sum Sq Mean Sq F value Pr(>F)
## grpUmur 2 22.222 11.1111 3.91 0.02993 *
## Residuals 33 93.778 2.8418
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AnovaModel2Arah <- lm(data = DataMember,
formula = Berat~grpUmur+grpMetode)
anova(AnovaModel2Arah)
## Analysis of Variance Table
##
## Response: Berat
## Df Sum Sq Mean Sq F value Pr(>F)
## grpUmur 2 22.222 11.1111 3.8278 0.03233 *
## grpMetode 1 0.889 0.8889 0.3062 0.58385
## Residuals 32 92.889 2.9028
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1