# tit <- toupper(names(tt)[i])
# print({{varx}})
# dfx %>%
tt %>%
ggplot() +
aes(x = temps, y = {{varx}}, fill = temps) +
geom_violin() +
geom_boxplot(fill = "white", width = 0.1) +
# labs() +
theme_light() +
theme(plot.title = element_text(size=16),
axis.title.x = element_blank(),
axis.title.y = element_text(size=12),
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
legend.position = "none") +
scale_y_continuous(limits = c(0,100))
}
tt %>%
map(tt,violon1)
violon1 <- function(varx){
# tit <- toupper(names(tt)[i])
# print({{varx}})
# dfx %>%
tt %>%
ggplot() +
aes(x = temps, y = {{varx}}, fill = temps) +
geom_violin() +
geom_boxplot(fill = "white", width = 0.1) +
# labs() +
theme_light() +
theme(plot.title = element_text(size=16),
axis.title.x = element_blank(),
axis.title.y = element_text(size=12),
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
legend.position = "none") +
scale_y_continuous(limits = c(0,100))
}
tt %>%
map(violon1)
nn <- names(tt)[3:12]
nn
violon1 <- function(varx){
# tit <- toupper(names(tt)[i])
# print({{varx}})
# dfx %>%
tt %>%
ggplot() +
aes(x = temps, y = {{varx}}, fill = temps) +
geom_violin() +
geom_boxplot(fill = "white", width = 0.1) +
# labs() +
theme_light() +
theme(plot.title = element_text(size=16),
axis.title.x = element_blank(),
axis.title.y = element_text(size=12),
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
legend.position = "none") +
scale_y_continuous(limits = c(0,100))
}
nn <- names(tt)[3:12]
tt %>%
map(nn, violon1)
violon1 <- function(varx){
# tit <- toupper(names(tt)[i])
# print({{varx}})
# dfx %>%
tt %>%
ggplot() +
aes(x = temps, y = {{varx}}, fill = temps) +
geom_violin() +
geom_boxplot(fill = "white", width = 0.1) +
# labs() +
theme_light() +
theme(plot.title = element_text(size=16),
axis.title.x = element_blank(),
axis.title.y = element_text(size=12),
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
legend.position = "none") +
scale_y_continuous(limits = c(0,100))
}
nn <- names(tt)[3:12]
tt %>%
walk(nn, violon1)
violon1 <- function(varx){
# tit <- toupper(names(tt)[i])
# print({{varx}})
# dfx %>%
tt %>%
ggplot() +
aes(x = temps, y = {{varx}}, fill = temps) +
geom_violin() +
geom_boxplot(fill = "white", width = 0.1) +
# labs() +
theme_light() +
theme(plot.title = element_text(size=16),
axis.title.x = element_blank(),
axis.title.y = element_text(size=12),
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
legend.position = "none") +
scale_y_continuous(limits = c(0,100))
}
nn <- names(tt)[3:12]
tt %>%
aa <- walk(nn, violon1)
violon1 <- function(varx){
# tit <- toupper(names(tt)[i])
# print({{varx}})
# dfx %>%
tt %>%
ggplot() +
aes(x = temps, y = {{varx}}, fill = temps) +
geom_violin() +
geom_boxplot(fill = "white", width = 0.1) +
# labs() +
theme_light() +
theme(plot.title = element_text(size=16),
axis.title.x = element_blank(),
axis.title.y = element_text(size=12),
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
legend.position = "none") +
scale_y_continuous(limits = c(0,100))
}
nn <- names(tt)[3:12]
aa <- tt %>%
walk(nn, violon1)
aa
violon1 <- function(varx){
# tit <- toupper(names(tt)[i])
# print({{varx}})
# dfx %>%
tt %>%
ggplot() +
aes(x = temps, y = {{varx}}, fill = temps) +
geom_violin() +
geom_boxplot(fill = "white", width = 0.1) +
# labs() +
theme_light() +
theme(plot.title = element_text(size=16),
axis.title.x = element_blank(),
axis.title.y = element_text(size=12),
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
legend.position = "none") +
scale_y_continuous(limits = c(0,100))
}
nn <- names(tt)[3:12]
aa <- tt %>%
map(nn, violon1)
aa
mtt <- PCA(tt[,3:12])
library(rmarkdown)
library(FactoMineR)
mtt <- PCA(tt[,3:12])
names(tt)
mtt <- PCA(tt[,c(1,3:12])
mtt <- PCA(tt[,c(1,3:12)]
)
mtt <- PCA(tt[1:22,c(1,3:12)]
)
mtt <- PCA(tt[23:44,c(1,3:12)])
names(tt)
mtt <- PCA(tt[23:44,-c(1,7,12)])
mtt <- PCA(tt[23:44,-c(2,7,12)])
mtt <- PCA(tt[1:22,-c(2,7,12)])
mtt <- PCA(tt[1:22,-c(1,2,7,12)])
HCPC(mtt)
View(tt)
tt[,12]
tt[12,]
tt[15,]
# Importation des données
#
tt <- read.csv("data/SF36 long.csv")
names(tt) <- tolower(names(tt))
names(tt) <- chartr("éàèêç","eaeec", names(tt))
tt$temps <- fct_rev(tt$temps)
av <- subset(tt,tt$temps == "avant")
ap <- subset(tt,tt$temps == "après")
tt$id <- as.factor(tt$id)
tt <- as_tibble(tt)
tt
tt  %>%
ggplot() +
aes(x = temps, y = pf, col = id) +
geom_line()
tt  %>%
ggplot() +
aes(x = temps, y = pf) +
geom_line()
aa <- cor(tt[1:22,3:12])
plot(aa)
aa
library(reshape2)
aa <- melt(aa)
names(aa)
aa <- cor(tt[1:22,3:12])
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value)) +
geom_tile()
aa <- cor(tt[1:22,3:12])
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile()
aa <- cor(tt[1:22,-c(1,2,7,12)])
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile()
aa <- cor(tt[23:44,-c(1,2,7,12)])
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile()
aa <- cor(tt[23:44,-c(1,2,7,12)])
aa <- melt(aa)
aa[upper.tri(aa)] <- NA
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile()
aa
aa <- cor(tt[23:44,-c(1,2,7,12)])
aa <- melt(aa)
aa[upper.tri(aa)] <- NA
aa
aa <- cor(tt[23:44,-c(1,2,7,12)])
aa[upper.tri(aa)] <- NA
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile()
aa <- cor(tt[23:44,-c(1,2,7,12)])
aa[upper.tri(aa)] <- NA
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile() +
scale_fill_gradient2(low = "blue", high = "red", mid = "white",
midpoint = 0, limit = c(-1,1), space = "Lab")
aa <- cor(tt[23:44,-c(1,2,7,12)])
aa[upper.tri(aa)] <- NA
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile() +
scale_fill_gradient2(low = "blue", high = "red", mid = "white",
midpoint = 0.5, limit = c(0,1), space = "Lab")
aa <- cor(tt[23:44,-c(1,2,7,12)])
aa[upper.tri(aa)] <- NA
aa <- melt(aa)
ggplot(aa) +
aes(x=Var1, y=Var2, fill=value) +
geom_tile() +
scale_fill_gradient2(low = "blue", high = "red", mid = "white",
midpoint = 0.999, limit = c(0,1), space = "Lab")
aa <- rcorr(tt[23:44,-c(1,2,7,12)])
aa <- rcorr(as.matrix(tt[23:44,-c(1,2,7,12)]))
aa
install.packages("corrplot")
library(corrplot)
aa <- rcorr(as.matrix(tt[23:44,-c(1,2,7,12)]))
corrplot(mcor, type="upper", order="hclust", tl.col="black", tl.srt=45)
aa <- rcorr(as.matrix(tt[23:44,-c(1,2,7,12)]))
corrplot(aa, type="upper", order="hclust", tl.col="black", tl.srt=45)
aa <- cor(tt[23:44,-c(1,2,7,12)])
corrplot(aa, type="upper", order="hclust", tl.col="black", tl.srt=45)
librayr(psy)
library(psy)
install.packages("psy")
library(psy)
cronbach(tt[,3:12])
cronbach(tt[,3:6,8:11])
cronbach(tt[,c(3:6,8:11)])
alpha(tt)
alpha(data=tt)
alpha(dataFrame =tt)
alpha(3:12,dataFrame =tt)
nn <- names(tt)
nn
alpha(nn[3:12],dataFrame =tt)
aa <- cronbach(tt[,c(3:6,8:11)])
aa
aa$alpha
aa <- cronbach(tt[,c(3:6,8:11)])
aa <- round(aa$alpha,2)
a
aa
aa <- cronbach(tt[,c(3:6,8:11)])
aa <- round(aa$alpha,3)
aa <- cronbach(tt[,c(3:6,8:11)])
aa <- round(aa$alpha,3)
aa
class(aa)
aa <- cronbach(av[,c(3:6,8:11)])
aa <- round(aa$alpha,3)
print("zz")
aa <- cor(tt[23:44,-c(1,2,7,12)])
corrplot(aa, type="upper", order="hclust", tl.col="black", tl.srt=45)
aa <- cor(av[23:44,-c(1,2,7,12)])
corrplot(aa, type="upper", order="hclust", tl.col="black", tl.srt=45)
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, type="upper", order="hclust", tl.col="black", tl.srt=45)
?corrplot
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, type="upper", order="hclust", tl.col="black", tl.srt=45, diag = FALSE)
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "square", type="upper", order="hclust", tl.col="black", tl.srt=45, diag = FALSE)
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "square", type="upper", order="hclust", tl.col="black", tl.srt=45, diag = FALSE, title ="Tableau de corrélation - Avant")
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "square", type="upper", order="hclust", tl.col="black", tl.srt=1, diag = FALSE, title ="Tableau de corrélation - Avant")
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "square", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant")
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant")
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", plotCI = "circle")
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", mar = 10)
?par
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", mar = c(5, 4, 10, 2))
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", mar = c(5, 4, 5, 2))
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", mar = c(5, 4, 4, 2))
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", mar = c(5, 4, 3, 2))
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", mar = c(5, 4, 2, 2))
aa <- cor(av[,-c(1,2,7,12)])
corrplot(aa, method = "color", type="upper", order="hclust", tl.col="black", diag = FALSE, title ="Tableau de corrélation - Avant", mar = c(5, 4, 1, 2))
tabdescph(tt[1:22,])
str(tt)
tt
names(tt)
tabdescph(tt)
tabdescph(tt[,3:4])
sd(tt$pf)
# Importation des données
#
tt <- read.csv("data/SF36 long.csv")
names(tt) <- tolower(names(tt))
names(tt) <- chartr("éàèêç", "eaeec", names(tt))
tt$temps <- fct_rev(tt$temps)
av <- subset(tt, tt$temps == "avant")
ap <- subset(tt, tt$temps == "après")
tt$id <- as.factor(tt$id)
#tt <- as_tibble(tt)
tabdescph(tt)
tabdescph(tt[,3:12])
?tabdescph
tabdescph(tt[,3:12], capt= 'Questionnaire "avant"')
tabdescph(tt[,3:12], capt= 'Questionnaire "avant"', lab = "descav", kable = TRUE)
tabdescph(tt[,3:12], capt= 'Questionnaire "avant"', lab = "descav", kable = 1)
tabdescph(tt[,3:12], capt= 'Questionnaire "avant"', lab = "descav", kk = 1)
tabdescph(tt[,3:12], capt= 'Questionnaire "avant"', lab = "descav", ka = 1)
rm(list = ls())
library("psy")
library("kable")
library("corrplot")
library("rmarkdown")
library("thesisph")
library("Hmisc")
library("tidyverse")
library("missMDA")
library("epiDisplay")
library("factoextra")
library("lubridate")
library("rlang")
library("knitr")
# sessionInfo()
#
# Importation des données
#
tt <- read.csv("data/SF36 long.csv")
names(tt) <- tolower(names(tt))
names(tt) <- chartr("éàèêç", "eaeec", names(tt))
tt$temps <- fct_rev(tt$temps)
av <- subset(tt, tt$temps == "avant")
ap <- subset(tt, tt$temps == "après")
tt$id <- as.factor(tt$id)
#tt <- as_tibble(tt)
tabdescph(tt[,3:12], capt= 'Questionnaire "avant"', lab = "descav", ka = 1)
rm(list = ls())
library("psy")
library("kableExtra")
library("corrplot")
library("rmarkdown")
library("thesisph")
library("Hmisc")
library("tidyverse")
library("missMDA")
library("epiDisplay")
library("factoextra")
library("lubridate")
library("rlang")
library("knitr")
# sessionInfo()
#
# Importation des données
#
tt <- read.csv("data/SF36 long.csv")
names(tt) <- tolower(names(tt))
names(tt) <- chartr("éàèêç", "eaeec", names(tt))
tt$temps <- fct_rev(tt$temps)
av <- subset(tt, tt$temps == "avant")
ap <- subset(tt, tt$temps == "après")
tt$id <- as.factor(tt$id)
#tt <- as_tibble(tt)
tabdescph(tt[,3:12], capt= 'Questionnaire "avant"', lab = "descav", ka = 1)
tabdescph(tt[1:22,3:12], capt= 'Questionnaire "avant"', lab = "descav", ka = 1)
tabdescph(tt[23:44,3:12], capt= 'Questionnaire "après"', lab = "descav", ka = 1)
library(lme4)
library(lmerTest)
rm(list = ls())
library("psy")
library("kableExtra")
library("corrplot")
library("rmarkdown")
library("thesisph")
library("Hmisc")
library("tidyverse")
library("missMDA")
library("epiDisplay")
library("FactoMineR")
library("factoextra")
library("lubridate")
library("rlang")
library("knitr")
library("lme4")
library("lmerTest")
# sessionInfo()
#
knitr::opts_chunk$set(echo = FALSE,
warning = FALSE,
message = FALSE)
# knitr::opts_chunk$set(echo = TRUE, warning = TRUE, message = TRUE)
rm(list = ls())
library("psy")
library("kableExtra")
library("corrplot")
library("rmarkdown")
library("thesisph")
library("Hmisc")
library("tidyverse")
library("missMDA")
library("epiDisplay")
library("FactoMineR")
library("factoextra")
library("lubridate")
library("rlang")
library("knitr")
library("lme4")
library("lmerTest")
# sessionInfo()
#
# Importation des données
#
tt <- read.csv("data/SF36 long.csv")
names(tt) <- tolower(names(tt))
names(tt) <- chartr("éàèêç", "eaeec", names(tt))
tt$temps <- fct_rev(tt$temps)
av <- subset(tt, tt$temps == "avant")
ap <- subset(tt, tt$temps == "après")
tt$id <- as.factor(tt$id)
#tt <- as_tibble(tt)
names(tt)
ll <- lmer(score.physique~1 + temps + (1+ temps|id), data =tt)
levels(tt$id)
tt$temps
rep(-1,22)
tt$tempsx <- c(rep(-1,22),rep(1,22))
table(tt$temps,tt$tempsx)
tt$tempsx <- c(rep(-1,22),rep(1,22))
ll <- lmer(score.physique~1 + tempsx + (1+ tempsx|id), data =tt)
tempsx|id
tt$tempsx|tt$id
str(tt)
?lmer
tt$tempsx <- c(rep(-1,22),rep(1,22))
ll <- lmer(score.physique ~ tempsx + (tempsx|id), data =tt)
data("sleepstudy")
str(sleepstudy)
fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
summary(fml)
fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
fml
ll <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
ll
summary(ll)
tt$tempsx <- c(rep(-1,22),rep(1,22))
ll <- lmer(score.physique ~ tempsx + (tempsx|id), data =tt, REML = FALSE)
table(tt$id, tt$table)
table(tt$id, tt$temps)
tt$tempsx <- c(rep(-0.5,22),rep(0.5,22))
ll <- lmer(score.physique ~ tempsx + (tempsx|id), data =tt, REML = FALSE)
ll <- lem4::lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
ll <- lme4::lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
summary(ll)
tt$tempsx <- c(rep(-0.5,22),rep(0.5,22))
ll <- lme4::lmer(score.physique ~ tempsx + (tempsx|id), data =tt, REML = FALSE)
source('~/actif/escrime/test.R')
source('~/actif/escrime/test2.R')
