tt <- read.csv("Recueil.csv",header=T)
summary(tt)
tabmulti(tt,tt$Uvedose)
levels(tt$Calcémie.J2)
tt <- read.csv("Recueil.csv",header=T)
summary(tt)
tabmulti(tt,tt$Uvedose)
library(FactoMineR)
library(missMDA)
estim_ncpPCA(tt)
ttn <- imputePCA(tt,0)
summary(ttn)
ttn <- ttn$completeObs
summary(ttn)
mcc <- PCA(ttn)
ttn <- ttn[,-1]
mcc <- PCA(ttn)
graphics.off() 
mcc <- PCA(ttn)
graphics.off() 
summary(tt)
names(tt) <- tolower(names(tt))
tt$uvedose <- as.factor(tt$uvedose)
tabmulti(tt,tt$Uvedose)
levels(tt$uvedose)
levels(tt$uvedose) <- c("non","oui")
tabmulti(tt,tt$Uvedose)
tab(tt$uvedose)
table(tt$uvedose)
t.test(tt$ca.corr.j3~tt$uvedose)
librayr(Hmisc)
library(Hmisc)
smean.sd(tt$ca.corr.j3)
smean.cl.boot(tt$ca.corr.j3)
smean.cl.boot(tt$ca.corr.j3[tt$uvedose=="oui"])
smean.cl.boot(tt$ca.corr.j3[tt$uvedose=="non"])
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T))
plot(density(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T))
lines(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T))
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T))
lines(density(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T))
library(epiDisplay)
n.for.2means(2.178571,2.119032)
smean.sd(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T)
smean.sd(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T)
n.for.2means(2.1016667,2.1785714,0.1888102 ,0.2147424)
save.image()
naes(tt)
names(tt)
tt$paresthésie.crampe <- as.factor(tt$paresthésie.crampe)
levels(tt$paresthésie.crampe)
levels(tt$paresthésie.crampe) <- c("non","oui")
tt <- ouinon(tt)
ll <- glm(tt$uvedose~paresthésie.crampe+hypoca.post.op+albumine.j1+ca.corr.j1+ca.corr.j2+ca.corr.j3,data=tt,family="binomial")
summarize(ll)
summary(ll)
save.image()
plot(mcc)
names(ttn)
ls()
ttn
plot(mcc,habillage=1)
summary(mcc)
plot(mcc,choix="var")
pdf("var.pdf",width=12,height=12) 
plot(mcc,choix="var")
graphics.off() 
plot(mcc,choix="ind")
pdf("ind.pdf",width=12,height=12) 
plot(mcc,choix="ind")
graphics.off() 
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T))
lines(density(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T))
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T),col="green",lwd=2)
lines(density(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T),col="red",lwd=2)
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T),col="green",lwd=2,mean="Ca corrigé J3",xlab="mmol/L")
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T),col="green",lwd=2,main="Ca corrigé J3",xlab="mmol/L")
lines(density(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T),col="red",lwd=2)
legend(1.6,2.5,c("Uvedose = oui","Uvedose = non"),col=c("green","red",lwd=5)
)
legend(1.6,2.5,c("Uvedose = oui","Uvedose = non"),col=c("green","red"),lwd=5)
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T),col="green",lwd=2,main="Ca corrigé J3",xlab="mmol/L")
lines(density(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T),col="red",lwd=2)
legend(1.6,2.5,c("Uvedose = oui","Uvedose = non"),col=c("green","red"),lwd=5)
pdf("uveJ3.pdf",width=12,height=9) 
plot(density(tt$ca.corr.j3[tt$uvedose=="oui"],na.rm=T),col="green",lwd=2,main="Ca corrigé J3",xlab="mmol/L")
lines(density(tt$ca.corr.j3[tt$uvedose=="non"],na.rm=T),col="red",lwd=2)
legend(1.6,2.5,c("Uvedose = oui","Uvedose = non"),col=c("green","red"),lwd=5)
graphics.off() 
names(tt)
 library()
names(tt)
ttx <- tt
ttx$id <- c(tt$id*3)
ttx
dim(tt)
dim(ttx)
ttx$id <- c(tt$id,tt$id,tt$id)
ls(ttx)
rm(ttx)
id <- c(tt$id,tt$id,tt$id)
id
cac <- c(tt$ca.corr.j1,tt$ca.corr.j2, tt$ca.corr.j3)
rep(1,3)
jour <- c(rep(1,76),rep(1,76),rep(1,76))
jour
jour <- c(rep(1,76),rep(2,76),rep(3,76))
jour
graphics.off() 
interaction.plot(jour,id,cac)
?interaction.plot
interaction.plot(jour,id,cac,legend=F,ylab="Ca corrigé (mmol/L)")
cor.test(hour,cac)
cor.test(jour,cac)
lines(lm(cac~jour),lwd=2,cor="red")
abline(lm(cac~jour),lwd=2,cor="red")
abline(lm(cac~jour),lwd=2,col="red")
abline(lm(cac~jour),lwd=3,col="red")
pdf("cac_jour.pdf",width=12,height=9) 
interaction.plot(jour,id,cac,legend=F,ylab="Ca corrigé (mmol/L)")
abline(lm(cac~jour),lwd=3,col="red")
graphics.off() 
graphics.off() q()
q()
y
ls()
names(tt)
summary(tt)
t.test(tt$ca.corr.j3~tt$uvedose)
aggregate(tt$ca.corr.j3,by=list(tt$uvedose),FUN=mean)
aggregate(tt$ca.corr.j3,by=list(tt$uvedose),FUN=mean,na.rm=T)
aggregate(tt$ca.corr.j3,by=list(tt$uvedose),FUN=sd,na.rm=T)
aggregate(tt$ca.corr.j1,by=list(tt$uvedose),FUN=mean,na.rm=T)
aggregate(tt$ca.corr.j1,by=list(tt$uvedose),FUN=sd,na.rm=T)
aggregate(tt$ca.corr.j2,by=list(tt$uvedose),FUN=mean,na.rm=T)
sort(c(2,15,5))
names(tt)
dim(tt)
sort(c(2,15,NA))
sort(c(2,15,NA,1))
tt[1,9]
tt$ca.corr.j1
tt[2,9]
sort(c(2,15,NA,1))[1
]
minca <- c(
)
mincaç <- c(minca,2)
mincaç
minca
tt[76 ]
tt[76,9]
tt[76,10]
tt[76,11]
tt[16,9]
tt[16,10]
tt[16,11]
aggregate(minca.j2,by=list(tt$uvedose),FUN=mean,na.rm=T)
aggregate(minca,by=list(tt$uvedose),FUN=mean,na.rm=T)
t.test(minca,tt$uvedose,var.equal=T)
t.test(minca~tt$uvedose,var.equal=T)
library(Hmisc)
library(epiDisplay)
aggregate(minca,by=list(tt$uvedose),FUN=mean,na.rm=T)
aggregate(minca,by=list(tt$uvedose),FUN=sd,na.rm=T)
n.for.2means(2.181000,2.136964,0.1479651,0.1670157)
n.for.2means(2.181000,2.136964,0.1479651,0.1670157,jpower=0.9)
n.for.2means(2.181000,2.136964,0.1479651,0.1670157,power=0.9)
aa <- rnorm(271,2.181000,0.1479651)
bb <- rnrom(271,2.136964,0.1670157)
bb <- rnorm(271,2.136964,0.1670157)
t.test(aa,bb,var.equal=T)
plot(density(aa))
lines(density(bb))
?rnorm
q()
y
tt <- read.csv("Thyroide - étude préliminaire.csv",header=T)
summary(tt)
tt <- read.csv("Thyroide - étude préliminaire.csv",header=T)
dim(tt)
names(tt)
tt <- read.csv("Thyroide1.csv",header=T)
tt <- read.csv("Thyroide1.csv",header=T)
summary(tt)
tt <- read.csv("Thyroide1.csv",header=T)
summary(tt)
tt <- read.csv("Thyroide1.csv",header=T)
summary(tt)
tt <- tt[,-1]
summary(tt)
save.image()
library(FactoMineR)
library(missMDA)
str(tt)
ttn <- as.numeric(tt)
ttn <- tt
ttn[,1] <- as.numeric(ttn[,1])
names(ttn)
ttn[,9] <- as.numeric(ttn[,9])
ttn[,10] <- as.numeric(ttn[,10])
save.image(tt)
save.image()
estim_ncpMCA(ttn)
estim_ncpPCA(ttn)
ttnx <- imputePCA(ttn,ncp=0)
ttnx <- ttnx$completeObs
mtt <- PCA(ttnx)
graphics.off() 
names(ttn)
ttn <- ttn[,-2]
ttn <- ttn[,-2]
names(ttn)
ttn <- ttn[,-2]
ttn <- ttn[,-2]
names(ttn)
estim_ncpPCA(ttn)
ttnx <- imputePCA(ttn,ncp=2)
ttnx <- ttnx$completeObs
mtt <- PCA(ttnx)
graphics.off() n
graphics.off() 
estim_ncpFAMD(tt)
names(tt)
ttx <- tt[,-c(2:6)]
names(ttx)
ttx <- tt[,-c(2:5)]
names(ttx)
estim_ncpFAMD(ttx)
nttx <- imputeFAMD(ttx,ncp=1)
nttx <- nttx$completeObs
mttx <- FAMD(nttx)
graphics.off() 
summary(mttx)
names(tt)
t.test(tt$Ca.corr.J1~tt$Uvedose)
t.test(tt$Ca.corr.J1~tt$Uvedose,var.equal=T)
boxplot(tt$Ca.corr.J1~tt$Uvedose)
boxplot(tt$Ca.corr.J1~tt$Uvedose,varwidth=T,notch=T)
aggregate(tt,by=list(tt$Uvedose),FUN=mean,na.rm=T)
aggregate(tt$Ca.corr.J1,by=list(tt$Uvedose),FUN=mean,na.rm=T)
aggregate(tt$Ca.corr.J1,by=list(tt$Uvedose),FUN=sd,na.rm=T)
library(epiDisplay)
n.for.2means(2.236966,2.305833,0.1684987,0.1598074)
plot(mttx)
? plot.FAMD
plot(mttx,choix="ind")
plot(mttx,choix="ind",invisible="var")
plot(mttx)
plot(mtt)
names(ttn)
plot(mtt,habillage=1)
plot(mtt,habillage=1)
plot(mttx,habillage=1)
chisq.test(tt$Uvedose,tt$paresthésie.crampe)
chisq.test(tt$Uvedose,tt$hypoCa.post.op)
table(tt$Uvedose,tt$hypoCa.post.op)
chisq.test(tt$Uvedose,tt$paresthésie.crampe,correct=T)
zz <- chisq.test(tt$Uvedose,tt$paresthésie.crampe,correct=F)
names(zz)
zz$expected
dim(tt)
summary(tt$Uvedose)
ll <- glm(tt$Uvedose~tt$calcémie.J1+tt$Albumine.J1,library="binomial")
ll <- glm(tt$Uvedose~tt$calcémie.J1+tt$Albumine.J1)
?glm
ll <- glm(tt$Uvedose~tt$calcémie.J1+tt$Albumine.J1,family="binomial")
summary(ll)
ll <- glm(tt$Uvedose~tt$calcémie.J1*tt$Albumine.J1,family="binomial")
summary(ll)
q()
y
names(tt)
levels(tt$paresthésie.crampe)
dcd <- ifelse(tt$Ca.corr.J1<2 |tt$Ca.corr.J2<2 |tt$paresthésie.crampe=="oui","oui","non")
table(dcd)
table(dcd,tt$Ca.corr.J1)
table(dcd,tt$Ca.corr.J2)
table(dcd,tt$paresthésie.crampe)
dcd <- ifelse(tt$Ca.corr.J1<2 |tt$Ca.corr.J2<2 |tt$paresthésie.crampe!="non","oui","non")
table(dcd,tt$paresthésie.crampe)
tt$paresthésie.crampe
dcd
dcd,tt$paresthésie.crampe
c(dcd,tt$paresthésie.crampe)
dcd <- as.factor(dcd)
table(dcd,tt$paresthésie.crampe)
c(dcd,tt$paresthésie.crampe)
matrix(c(dcd,tt$paresthésie.crampe),ncol=2
)
tt$paresthésie.crampe[11]
dcd[11]
library(epiDisplay)
cc(dcd,tt$Uvedose)
100/21
100/22
2200/77
?power.for.2p
n.for.2p(1/21,22/77)
?cc
cc(dcd,tt$Uvedose,graph=T)
plot(dcd)
cc(dcd,tt$Uvedose,graph=T)
tt$dcd <- dcd
cc(tt$dcd,tt$Uvedose,graph=T)
?ic
?cci
?ccn
ccn(tt$dcd,tt$Uvedose,graph=T)
cc(tt$dcd,tt$Uvedose,graph=T)
plot(tt$dcd,tt$Uvedose)
library(FactoMineR)
?PCA
namez()
names(tt)
tta <- tt[,c(1,2,6,7,8,10)]
names(tta)
rtt <- FAMD(tta)
rtt <- PCA(tta)
?MCA
str(tta)
tta$paresthésie.crampe <- as.numeric(tt$paresthésie.crampe)
tta$Uvedose <- as.numeric(tt$Uvedose)
rtt <- PCA(tta)
graphics.off() 
plot(rtt)
pdf("individus.pdf",width=12,height=9) 
pdf("individus.pdf",width=12,height=12) 
plot(rtt)
graphics.off() 
plot(rtt,choix="var")
pdf("variables.pdf",width=12,height=12) 
plot(rtt,choix="var")
pdf("individus.pdf",width=12,height=12) 
plot(rtt,choix="var")
graphics.off() 
pdf("variables.pdf",width=12,height=12) 
plot(rtt)
graphics.off() 
pdf("variables.pdf",width=12,height=12) 
plot(rtt,choix="var")
graphics.off() 
pdf("individus.pdf",width=12,height=12) 
plot(rtt)
graphics.off() 
pdf("individus.pdf",width=12,height=12) 
graphics.off() 
plot(rtt)
plot(rtt,choix="var")
chisq.test(tt$Uvedose,tt$paresthésie.crampe)
zz <- chisq.test(tt$Uvedose,tt$paresthésie.crampe)
names(zz)
zz$expected
q()
y
