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 Fitness.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$Umur,
breaks = c (0, 1 , 2, Inf),
labels = c("<20", "20-40", ">40"))
cor.test(DataMember$Berat,DataMember$Umur)
##
## Pearson's product-moment correlation
##
## data: DataMember$Berat and DataMember$Umur
## t = 0.22118, df = 34, p-value = 0.8263
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.2942957 0.3619334
## sample estimates:
## cor
## 0.0379049
Anovamodel1Arah <- lm(data=DataMember,
formula = Berat~grpUmur)
Anova(Anovamodel1Arah)
## Anova Table (Type II tests)
##
## Response: Berat
## Sum Sq Df F value Pr(>F)
## grpUmur 0.667 2 0.0954 0.9093
## Residuals 115.333 33
AnovaModelAOV <- aov(data = DataMember,
formula = Berat~grpMetode*grpUmur)
Anova(AnovaModelAOV)
## Anova Table (Type II tests)
##
## Response: Berat
## Sum Sq Df F value Pr(>F)
## grpMetode 23.111 3 3.0476 0.04811 *
## grpUmur 0.667 2 0.1319 0.87709
## grpMetode:grpUmur 31.556 6 2.0806 0.09350 .
## Residuals 60.667 24
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AnovaModelAOV_Gab <- aov(data = DataMember,
formula = Berat~(grpMetode+grpUmur))
summary(AnovaModelAOV_Gab)
## Df Sum Sq Mean Sq F value Pr(>F)
## grpMetode 3 23.11 7.704 2.506 0.078 .
## grpUmur 2 0.67 0.333 0.108 0.898
## Residuals 30 92.22 3.074
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.