#library(verification,lib.loc="/home/paulb/R/x86_64-redhat-linux-gnu-library/2.15"); source("/Volumes/shared_data/paulb/R/Functions/verify_mod.R") #I modified the function "verify" of the package to add the computation of ACC #Parameters of the program you can change ######################################################################## Directory_Data<-"/Volumes/shared_data/paulb/Data/Kenya/" #Directory where the parameters are defined Directory_Communication<-"/Volumes/shared_data/paulb/Results/Communication/Verification/" Directory_Output<-"/Volumes/shared_data/paulb/Results/Results/Skills/" #Directory where you want your output to be stocked. ################### # Lauch on scilab : # exec('~/Scilab/infectedVerification/infected_XXX') and # exec('~/Scilab/infectedVerification/Climatology.sci') ################### # Computation of the scores for the monthly mean values reg<-list() for (k in 1:12) { for (l in 0:2) { pred<-list() for (XXX in c("WCT","MAC","AM","ABP")) { pred[[XXX]]<-list() pred[[XXX]]<- as.vector(as.matrix(read.csv(paste(Directory_Communication,XXX,"_mean_Start_Month_",k,"_Pred_Month_",k+l,"_SimulatedCases.csv",sep=""),sep=",",header=FALSE))) } obs<-as.vector(as.matrix(read.csv(paste(Directory_Communication,"WCT","_mean_Start_Month_",k,"_Pred_Month_",k+l,"_PositiveCases.csv",sep=""),sep=",",header=FALSE))) baseline <- as.vector(as.matrix(read.csv(paste(Directory_Communication,"WCT","_mean_Start_Month_",k,"_Pred_Month_",k+l,"_BaselineCases.csv",sep=""),sep=",",header=FALSE))) reg[[paste("Starting Month ",k," Ending Month ",k+l)]] reg[[paste("Starting Month ",k," Ending Month ",k+l)]]<-lm(obs ~ pred$WCT + pred$MAC + pred$AM + pred$ABP + baseline) summary(reg[[paste("Starting Month ",k," Ending Month ",k+l)]]) #layout(matrix(1:4,2,2)) #plot(reg[[paste("Starting Month ",k," Ending Month ",k+l)]]) } } #write.table(Summary,file=paste(Directory_Output,XXX,"_mean_Continuous_Skill_Scores_3_Month_Predictions.csv",sep=""),quote=FALSE,sep=",")