library(intsvy)
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.2.5
library(gridExtra)
## Warning: package 'gridExtra' was built under R version 3.2.5
library(grid)
library(car)
## Warning: package 'car' was built under R version 3.2.5
  # Veri setlerini yeniden hesaplanmis ESCS degerleri ile birlestirme

    # 2003

      colnames(escs_2003)[1:3] <- c("CNT","SCHOOLID","STIDSTD") 

      pisa_2003_stu <- merge(pisa_2003_stu,escs_2003,by=c("CNT","SCHOOLID","STIDSTD") ,all=TRUE)

    # 2006

      levels(escs_2006$cnt)
##  [1] "ARG" "AUS" "AUT" "BEL" "BGR" "BRA" "CAN" "CHE" "CHL" "COL" "CZE"
## [12] "DEU" "DNK" "ESP" "EST" "FIN" "FRA" "GBR" "GRC" "HKG" "HRV" "HUN"
## [23] "IDN" "IRL" "ISL" "ISR" "ITA" "JOR" "JPN" "KOR" "LTU" "LUX" "LVA"
## [34] "MAC" "MEX" "MNE" "NLD" "NOR" "NZL" "POL" "PRT" "QAT" "ROU" "RUS"
## [45] "SVK" "SVN" "SWE" "TAP" "THA" "TUN" "TUR" "URY" "USA"
          levels(escs_2006$cnt) <- c("Argentina","Australia","Austria","Belgium","Bulgaria"
                                     ,"Brazil","Canada","Switzerland","Chile","Colombia",
                                     "Czech Republic","Germany","Denmark","Spain","Estonia",
                                     "Finland","France","United Kingdom","Greece",
                                     "Hong Kong-China","Croatia","Hungary","Indonesia","Ireland",
                                     "Iceland","Israel", "Italy","Jordan","Japan","Korea",
                                     "Lithuania","Luxembourg","Latvia","Macao-China",
                                     "Mexico","Montenegro","Netherlands","Norway","New Zealand",
                                     "Poland","Portugal","Qatar","Romania","Russian Federation",
                                     "Slovak Republic","Slovenia ","Sweden",
                                     "Chinese Taipei","Thailand","Tunisia","Turkey","Uruguay",
                                     "United States")

          levels(escs_2006$cnt)
##  [1] "Argentina"          "Australia"          "Austria"           
##  [4] "Belgium"            "Bulgaria"           "Brazil"            
##  [7] "Canada"             "Switzerland"        "Chile"             
## [10] "Colombia"           "Czech Republic"     "Germany"           
## [13] "Denmark"            "Spain"              "Estonia"           
## [16] "Finland"            "France"             "United Kingdom"    
## [19] "Greece"             "Hong Kong-China"    "Croatia"           
## [22] "Hungary"            "Indonesia"          "Ireland"           
## [25] "Iceland"            "Israel"             "Italy"             
## [28] "Jordan"             "Japan"              "Korea"             
## [31] "Lithuania"          "Luxembourg"         "Latvia"            
## [34] "Macao-China"        "Mexico"             "Montenegro"        
## [37] "Netherlands"        "Norway"             "New Zealand"       
## [40] "Poland"             "Portugal"           "Qatar"             
## [43] "Romania"            "Russian Federation" "Slovak Republic"   
## [46] "Slovenia "          "Sweden"             "Chinese Taipei"    
## [49] "Thailand"           "Tunisia"            "Turkey"            
## [52] "Uruguay"            "United States"
          colnames(escs_2006)[1:3] <- c("CNT","SCHOOLID","STIDSTD")
        
        pisa_2006_stu <- merge(pisa_2006_stu,escs_2006,by=c("CNT","SCHOOLID","STIDSTD") ,all=TRUE)

    # 2009

        levels(escs_2009$cnt)
##  [1] "ALB" "ARE" "ARG" "AUS" "AUT" "BEL" "BGR" "BRA" "CAN" "CHE" "CHL"
## [12] "COL" "CRI" "CZE" "DEU" "DNK" "ESP" "EST" "FIN" "FRA" "GBR" "GEO"
## [23] "GRC" "HKG" "HRV" "HUN" "IDN" "IRL" "ISL" "ISR" "ITA" "JOR" "JPN"
## [34] "KAZ" "KOR" "LTU" "LUX" "LVA" "MAC" "MDA" "MEX" "MLT" "MNE" "MYS"
## [45] "NLD" "NOR" "NZL" "PER" "POL" "PRT" "QAT" "ROU" "RUS" "SGP" "SVK"
## [56] "SVN" "SWE" "TAP" "THA" "TTO" "TUN" "TUR" "URY" "USA"
          levels(escs_2009$cnt) <- c("Albania","United Arab Emirates","Argentina","Australia",
                                     "Austria","Belgium","Bulgaria","Brazil","Canada",
                                     "Switzerland","Chile","Colombia","Costa Rica",
                                     "Czech Republic","Germany","Denmark",
                                     "Spain","Estonia","Finland","France","United Kingdom",
                                     "Georgia","Greece","Hong Kong-China","Croatia","Hungary",
                                     "Indonesia","Ireland","Iceland","Israel", "Italy","Jordan",
                                     "Japan","Kazakhstan","Korea","Lithuania","Luxembourg",
                                     "Latvia","Macao-China","Republic of Moldova","Mexico",
                                     "Malta","Montenegro","Malaysia","Netherlands","Norway",
                                     "New Zealand","Peru","Poland","Portugal","Qatar","Romania",
                                     "Russian Federation","Singapore","Slovak Republic",
                                     "Slovenia","Sweden","Chinese Taipei","Thailand",
                                     "Trinidad and Tobago","Tunisia","Turkey","Uruguay",
                                     "United States")

          levels(escs_2009$cnt)
##  [1] "Albania"              "United Arab Emirates" "Argentina"           
##  [4] "Australia"            "Austria"              "Belgium"             
##  [7] "Bulgaria"             "Brazil"               "Canada"              
## [10] "Switzerland"          "Chile"                "Colombia"            
## [13] "Costa Rica"           "Czech Republic"       "Germany"             
## [16] "Denmark"              "Spain"                "Estonia"             
## [19] "Finland"              "France"               "United Kingdom"      
## [22] "Georgia"              "Greece"               "Hong Kong-China"     
## [25] "Croatia"              "Hungary"              "Indonesia"           
## [28] "Ireland"              "Iceland"              "Israel"              
## [31] "Italy"                "Jordan"               "Japan"               
## [34] "Kazakhstan"           "Korea"                "Lithuania"           
## [37] "Luxembourg"           "Latvia"               "Macao-China"         
## [40] "Republic of Moldova"  "Mexico"               "Malta"               
## [43] "Montenegro"           "Malaysia"             "Netherlands"         
## [46] "Norway"               "New Zealand"          "Peru"                
## [49] "Poland"               "Portugal"             "Qatar"               
## [52] "Romania"              "Russian Federation"   "Singapore"           
## [55] "Slovak Republic"      "Slovenia"             "Sweden"              
## [58] "Chinese Taipei"       "Thailand"             "Trinidad and Tobago" 
## [61] "Tunisia"              "Turkey"               "Uruguay"             
## [64] "United States"
          colnames(escs_2009)[1:3] <- c("CNT","SCHOOLID","StIDStd")
        
         pisa_2009_stu <- merge(pisa_2009_stu,escs_2009,by=c("CNT","SCHOOLID","StIDStd") ,all=TRUE)

      # 2012

          levels(escs_2012$cnt)
##  [1] "ALB" "ARE" "ARG" "AUS" "AUT" "BEL" "BGR" "BRA" "CAN" "CHE" "CHL"
## [12] "COL" "CRI" "CZE" "DEU" "DNK" "ESP" "EST" "FIN" "FRA" "GBR" "GRC"
## [23] "HKG" "HRV" "HUN" "IDN" "IRL" "ISL" "ISR" "ITA" "JOR" "JPN" "KAZ"
## [34] "KOR" "LTU" "LUX" "LVA" "MAC" "MEX" "MNE" "MYS" "NLD" "NOR" "NZL"
## [45] "PER" "POL" "PRT" "QAT" "QUC" "ROU" "RUS" "SGP" "SVK" "SVN" "SWE"
## [56] "TAP" "THA" "TUN" "TUR" "URY" "USA" "VNM"
          levels(escs_2012$cnt) <- c("Albania","United Arab Emirates","Argentina","Australia",
                                     "Austria","Belgium",
                                     "Bulgaria","Brazil","Canada",
                                     "Switzerland","Chile","Colombia","Costa Rica",
                                     "Czech Republic","Germany","Denmark",
                                     "Spain","Estonia","Finland","France","United Kingdom",
                                     "Greece","Hong Kong-China",
                                     "Croatia","Hungary","Indonesia","Ireland","Iceland",
                                     "Israel","Italy","Jordan","Japan","Kazakhstan","Korea",
                                     "Lithuania","Luxembourg","Latvia","Macao-China",
                                     "Mexico","Montenegro","Malaysia","Netherlands","Norway",
                                     "New Zealand","Peru","Poland","Portugal","Qatar",
                                     "Shanghai-China","Romania","Russian Federation","Singapore",
                                     "Slovak Republic","Slovenia","Sweden","Chinese Taipei",
                                     "Thailand","Tunisia","Turkey",
                                     "Uruguay","United States of America","Viet Nam")

          levels(escs_2012$cnt)
##  [1] "Albania"                  "United Arab Emirates"    
##  [3] "Argentina"                "Australia"               
##  [5] "Austria"                  "Belgium"                 
##  [7] "Bulgaria"                 "Brazil"                  
##  [9] "Canada"                   "Switzerland"             
## [11] "Chile"                    "Colombia"                
## [13] "Costa Rica"               "Czech Republic"          
## [15] "Germany"                  "Denmark"                 
## [17] "Spain"                    "Estonia"                 
## [19] "Finland"                  "France"                  
## [21] "United Kingdom"           "Greece"                  
## [23] "Hong Kong-China"          "Croatia"                 
## [25] "Hungary"                  "Indonesia"               
## [27] "Ireland"                  "Iceland"                 
## [29] "Israel"                   "Italy"                   
## [31] "Jordan"                   "Japan"                   
## [33] "Kazakhstan"               "Korea"                   
## [35] "Lithuania"                "Luxembourg"              
## [37] "Latvia"                   "Macao-China"             
## [39] "Mexico"                   "Montenegro"              
## [41] "Malaysia"                 "Netherlands"             
## [43] "Norway"                   "New Zealand"             
## [45] "Peru"                     "Poland"                  
## [47] "Portugal"                 "Qatar"                   
## [49] "Shanghai-China"           "Romania"                 
## [51] "Russian Federation"       "Singapore"               
## [53] "Slovak Republic"          "Slovenia"                
## [55] "Sweden"                   "Chinese Taipei"          
## [57] "Thailand"                 "Tunisia"                 
## [59] "Turkey"                   "Uruguay"                 
## [61] "United States of America" "Viet Nam"
        colnames(escs_2012)[1:3] <- c("CNT","SCHOOLID","StIDStd")
        pisa_2012_stu <- merge(pisa_2012_stu,escs_2012,by=c("CNT","SCHOOLID","StIDStd") ,all=TRUE)


  # Simdide 2003, 2006, 2009, 2012,2015 yillarinda 2015 icin yaptigimiz gibi Turkiye verisini suzelim.

        pisa_2015_stu_TUR <- subset(pisa_2015_stu,CNT=='Turkey')
        pisa_2012_stu_TUR <- subset(pisa_2012_stu,CNT=="Turkey")
        pisa_2009_stu_TUR <- subset(pisa_2009_stu,CNT=='Turkey')
        pisa_2006_stu_TUR <- subset(pisa_2006_stu,CNT=='Turkey')
        pisa_2003_stu_TUR <- subset(pisa_2003_stu,CNT=='TUR')


  # OECD verisini suzelim

        pisa_2015_stu_OECD <- subset(pisa_2015_stu,OECD=="Yes")
        pisa_2012_stu_OECD <- subset(pisa_2012_stu,OECD=="OECD")
        pisa_2009_stu_OECD <- subset(pisa_2009_stu,OECD=="OECD")
        pisa_2006_stu_OECD <- subset(pisa_2006_stu,OECD=="OECD")
        pisa_2003_stu_OECD <- subset(pisa_2003_stu,OECD=="OECD country")

  # AB verisini suzelim

        AB <- c("AUT","BEL","BGR","HRV","CYP","CZE","DNK","EST","FIN","FRA","DEU","GRC","HUN",
                "IRL","ITA","LVA","LTU","LUX","MLT","NLD","POL","PRT","ROU","SVK","SVN","ESP",
                "SWE")

        AB2 <- c("Austria","Belgium","Bulgaria","Croatia","Cyprus","Czech Republic","Denmark",
                 "Estonia","Finland","France","Germany","Greece","Hungary","Ireland","Italy",
                 "Latvia","Lithuania","Luxembourg","Malta","Netherlands","Poland","Portugal",
                 "Romania","Slovak Republic","Slovenia ","Spain","Sweden")

        AB3 <- c("Austria","Belgium","Bulgaria","Croatia","Cyprus","Czech Republic","Denmark",
                 "Estonia","Finland","France","Germany","Greece","Hungary","Ireland","Italy",
                 "Latvia","Lithuania","Luxembourg","Malta","Netherlands","Poland","Portugal",
                 "Romania","Slovak Republic","Slovenia","Spain","Sweden")
        

            pisa_2003_stu_AB <- subset(pisa_2003_stu, CNT %in% AB)
            pisa_2006_stu_AB <- subset(pisa_2006_stu, CNT %in% AB2)
            pisa_2009_stu_AB <- subset(pisa_2009_stu, CNT %in% AB3)
            pisa_2012_stu_AB <- subset(pisa_2012_stu, CNT %in% AB3)
            pisa_2015_stu_AB <- subset(pisa_2015_stu, CNT %in% AB3)

Cinsiyet ve PISA Puanlari

Matematik

  m2003 <- pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR,by="ST03Q01")
    colnames(m2003)[1]="Cinsiyet"
  m2006 <- pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR,by="ST04Q01")
    colnames(m2006)[1]="Cinsiyet"
  m2009<- pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR,by="ST04Q01")
    colnames(m2009)[1]="Cinsiyet"
  m2012 <- pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR,by="ST04Q01")
    colnames(m2012)[1]="Cinsiyet"
  m2015 <- pisa2015.mean.pv(pvlabel="MATH",data=pisa_2015_stu_TUR,by="ST004D01T")
    colnames(m2015)[1]="Cinsiyet"
  
   m <- rbind(m2003,m2006,m2009,m2012,m2015)
   m$year <- c(rep(1,2),rep(2,2),rep(3,2),rep(4,2),rep(5,2))
   m$Mean2 <- round(m$Mean)

   ggplot(m, aes(x=year, y=Mean,shape=Cinsiyet)) +
    theme_bw() +
    geom_errorbar(aes(ymin=Mean-1.96*s.e., ymax=Mean+1.96*s.e.),position = position_dodge(0.2),lty=2,colour="gray",width=.2) +
    geom_point(size=4, fill="black",position = position_dodge(0.2)) +
    geom_line(position = position_dodge(0.2))+
    scale_x_discrete(limit = 1:5,labels=c("2003","2006","2009","2012","2015"))+ 
    scale_y_continuous(limit = c(350,500))  +
    labs(title = "                                MATEMATIK", 
          x = "YIL", y = "PISA PUANI",
          shape=" ")+
    theme(axis.title= element_text(size = 15),      
          axis.text= element_text(size = 12),
          title = element_text(size = 20),
          legend.justification=c(-0.5,-0.2),
          legend.position=c(0,0),
          legend.text=element_text(size = 12)   
          ) +
     annotation_custom(grob = textGrob("@pisa_turkiye"),  
        xmin = 5.25, xmax = 5.25, ymin =, ymax = 490)+
       geom_text(aes(y=Mean,label=Mean2),stat= "identity", position=position_dodge(.2),vjust = -1,hjust=.5)

Okuma

  m2003 <- pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR,by="ST03Q01")
    colnames(m2003)[1]="Cinsiyet"
  m2006 <- pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR,by="ST04Q01")
    colnames(m2006)[1]="Cinsiyet"
  m2009<- pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR,by="ST04Q01")
    colnames(m2009)[1]="Cinsiyet"
  m2012 <- pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR,by="ST04Q01")
    colnames(m2012)[1]="Cinsiyet"
  m2015 <- pisa2015.mean.pv(pvlabel="READ",data=pisa_2015_stu_TUR,by="ST004D01T")
    colnames(m2015)[1]="Cinsiyet"

   m <- rbind(m2003,m2006,m2009,m2012,m2015)
   m$year <- c(rep(1,2),rep(2,2),rep(3,2),rep(4,2),rep(5,2))
   m$Mean2 <- round(m$Mean)
  
   ggplot(m, aes(x=year, y=Mean,shape=Cinsiyet)) +
    theme_bw() +
    geom_errorbar(aes(ymin=Mean-1.96*s.e., ymax=Mean+1.96*s.e.),position = position_dodge(0.2),lty=2,colour="gray",width=.2) +
    geom_point(size=4, fill="black",position = position_dodge(0.2)) +
    geom_line(position = position_dodge(0.2))+
    scale_x_discrete(limit = 1:5,labels=c("2003","2006","2009","2012","2015"))+ 
    scale_y_continuous(limit = c(350,550))  +
    labs(title = "                                       OKUMA BECERISI", 
          x = "YIL", y = "PISA PUANI",
          shape=" ")+
    theme(axis.title= element_text(size = 15),      
          axis.text= element_text(size = 12),
          title = element_text(size = 20),
          legend.justification=c(-0.5,-0.2),
          legend.position=c(0,0),
          legend.text=element_text(size = 12)   
          ) +
     annotation_custom(grob = textGrob("@pisa_turkiye"),  
        xmin = 5.25, xmax = 5.25, ymin = 490, ymax = 490) +
     geom_text(aes(y=Mean,label=Mean2),stat= "identity", position=position_dodge(.2),vjust = -1,hjust=0)

Fen

  m2003 <- pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR,by="ST03Q01")
    colnames(m2003)[1]="Cinsiyet"
  m2006 <- pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR,by="ST04Q01")
    colnames(m2006)[1]="Cinsiyet"
  m2009<- pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR,by="ST04Q01")
    colnames(m2009)[1]="Cinsiyet"
  m2012 <- pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR,by="ST04Q01")
    colnames(m2012)[1]="Cinsiyet"
  m2015 <- pisa2015.mean.pv(pvlabel="SCIE",data=pisa_2015_stu_TUR,by="ST004D01T")
    colnames(m2015)[1]="Cinsiyet"

   m <- rbind(m2003,m2006,m2009,m2012,m2015)
   m$year <- c(rep(1,2),rep(2,2),rep(3,2),rep(4,2),rep(5,2))
   m$Mean2 <- round(m$Mean)
  
   ggplot(m, aes(x=year, y=Mean,shape=Cinsiyet)) +
    theme_bw() +
    geom_errorbar(aes(ymin=Mean-1.96*s.e., ymax=Mean+1.96*s.e.),position = position_dodge(0.2),lty=2,colour="gray",width=.2) +
    geom_point(size=4, fill="black",position = position_dodge(0.2)) +
    geom_line(position = position_dodge(0.2))+
    scale_x_discrete(limit = 1:5,labels=c("2003","2006","2009","2012","2015"))+ 
    scale_y_continuous(limit = c(350,550))  +
    labs(title = "                                       FEN", 
          x = "YIL", y = "PISA PUANI",
          shape=" ")+
    theme(axis.title= element_text(size = 15),      
          axis.text= element_text(size = 12),
          title = element_text(size = 20),
          legend.justification=c(-0.5,-0.2),
          legend.position=c(0,0),
          legend.text=element_text(size = 12)   
          ) +
     annotation_custom(grob = textGrob("@pisa_turkiye"),  
        xmin = 5.25, xmax = 5.25, ymin = 490, ymax = 490) +
     geom_text(aes(y=Mean,label=Mean2),stat= "identity", position=position_dodge(.2),vjust = 2,hjust=0.6)

FEN alt-categori puanlari

  m2015.scep <- pisa2015.mean.pv(pvlabel="SCEP",data=pisa_2015_stu_TUR,by="ST004D01T")
  m2015.sced <- pisa2015.mean.pv(pvlabel="SCED",data=pisa_2015_stu_TUR,by="ST004D01T")
  m2015.scid <- pisa2015.mean.pv(pvlabel="SCID",data=pisa_2015_stu_TUR,by="ST004D01T")
  m2015.skco <- pisa2015.mean.pv(pvlabel="SKCO",data=pisa_2015_stu_TUR,by="ST004D01T")
  m2015.skpe <- pisa2015.mean.pv(pvlabel="SKPE",data=pisa_2015_stu_TUR,by="ST004D01T")
  m2015.ssph <- pisa2015.mean.pv(pvlabel="SSPH",data=pisa_2015_stu_TUR,by="ST004D01T")
  m2015.ssli <- pisa2015.mean.pv(pvlabel="SSLI",data=pisa_2015_stu_TUR,by="ST004D01T")
  m2015.sses <- pisa2015.mean.pv(pvlabel="SSES",data=pisa_2015_stu_TUR,by="ST004D01T")

   # OECD

    m2015.scep2 <- pisa2015.mean.pv(pvlabel="SCEP",data=pisa_2015_stu_OECD,by="CNT")
    m2015.sced2 <- pisa2015.mean.pv(pvlabel="SCED",data=pisa_2015_stu_OECD,by="CNT")
    m2015.scid2 <- pisa2015.mean.pv(pvlabel="SCID",data=pisa_2015_stu_OECD,by="CNT")
    m2015.skco2 <- pisa2015.mean.pv(pvlabel="SKCO",data=pisa_2015_stu_OECD,by="CNT")
    m2015.skpe2 <- pisa2015.mean.pv(pvlabel="SKPE",data=pisa_2015_stu_OECD,by="CNT")
    m2015.ssph2 <- pisa2015.mean.pv(pvlabel="SSPH",data=pisa_2015_stu_OECD,by="CNT")
    m2015.ssli2 <- pisa2015.mean.pv(pvlabel="SSLI",data=pisa_2015_stu_OECD,by="CNT")
    m2015.sses2 <- pisa2015.mean.pv(pvlabel="SSES",data=pisa_2015_stu_OECD,by="CNT")

 # AB

    m2015.scep3 <- pisa2015.mean.pv(pvlabel="SCEP",data=pisa_2015_stu_AB,by="CNT")
    m2015.sced3 <- pisa2015.mean.pv(pvlabel="SCED",data=pisa_2015_stu_AB,by="CNT")
    m2015.scid3 <- pisa2015.mean.pv(pvlabel="SCID",data=pisa_2015_stu_AB,by="CNT")
    m2015.skco3 <- pisa2015.mean.pv(pvlabel="SKCO",data=pisa_2015_stu_AB,by="CNT")
    m2015.skpe3 <- pisa2015.mean.pv(pvlabel="SKPE",data=pisa_2015_stu_AB,by="CNT")
    m2015.ssph3 <- pisa2015.mean.pv(pvlabel="SSPH",data=pisa_2015_stu_AB,by="CNT")
    m2015.ssli3 <- pisa2015.mean.pv(pvlabel="SSLI",data=pisa_2015_stu_AB,by="CNT")
    m2015.sses3 <- pisa2015.mean.pv(pvlabel="SSES",data=pisa_2015_stu_AB,by="CNT")

    m <- rbind(m2015.scep,m2015.sced,m2015.scid,m2015.skco,
              m2015.skpe,m2015.ssph,m2015.ssli,m2015.sses)

    oecd <- rbind(mean(m2015.scep2[,3],na.rm=TRUE),mean(m2015.sced2[,3],na.rm=TRUE),
                  mean(m2015.scid2[,3],na.rm=TRUE),mean(m2015.skco2[,3],na.rm=TRUE),
                  mean(m2015.skpe2[,3],na.rm=TRUE),mean(m2015.ssph2[,3],na.rm=TRUE),
                  mean(m2015.ssli2[,3],na.rm=TRUE),mean(m2015.sses2[,3],na.rm=TRUE))

    ab   <- rbind(mean(m2015.scep3[,3],na.rm=TRUE),mean(m2015.sced3[,3],na.rm=TRUE),
                  mean(m2015.scid3[,3],na.rm=TRUE),mean(m2015.skco3[,3],na.rm=TRUE),
                  mean(m2015.skpe3[,3],na.rm=TRUE),mean(m2015.ssph3[,3],na.rm=TRUE),
                  mean(m2015.ssli3[,3],na.rm=TRUE),mean(m2015.sses3[,3],na.rm=TRUE))


   m$tip <- c(rep("Bir Olguyu \n Bilimsel \n Olarak Aciklama",2),
              rep("Bilimsel bir \n Arastirmayi \n Tasarlama ve \n Degerlendirme",2),
              rep("Veri ve Delilleri \n Bilimsel \n Olarak Yorumlama",2),
              rep("Mufredat Bilgisi",2),
              rep("Yontemsel ve \n Epistemik Bilgi",2),
              rep("Fiziksel",2),
              rep("Yasam",2),
              rep("Yeryuzu ve Bilim",2))

   m$Mean2 <- round(m$Mean)

   m <- m[order(m$ST004D01T),]

   m$oecd <- round(oecd[,1])
   m$ab <- round(ab[,1])
   m$oecd2 <- "OECD Ortalamasi"

   ggplot(m, aes(x=tip, y=Mean,shape=ST004D01T)) +
    theme_bw() +
    geom_errorbar(aes(ymin=Mean-1.96*s.e., ymax=Mean+1.96*s.e.),position = position_dodge(0.4),lty=2,colour="gray50",width=.15) +
    geom_point(size=5, fill="black",position = position_dodge(0.4)) +
    geom_point(aes(x=tip, y=oecd),size=2,pch=3) +
    scale_y_continuous(limit = c(350,550))  +
     labs(title = "                           FEN OKURYAZARLIGI - ALT KATEGORILER", 
          x = "Kategori", y = "PISA PUANI",
          shape=" ")+
    theme(axis.title= element_text(size = 15),      
          axis.text= element_text(size = 12),
          axis.text.x = element_text(angle = 0, hjust = .5,size=10),
          title = element_text(size = 20),
          legend.justification=c(0,0),
          legend.position=c(0.8,0),
          legend.text=element_text(size = 12)   
          ) +
     annotation_custom(grob = textGrob("@pisa_turkiye"),  
        xmin = 1, xmax = 1, ymin = 550, ymax = 550) +
     geom_text(aes(y=Mean,label=Mean2),stat= "identity", position=position_dodge(1.1),vjust = 1,hjust=0.4,size=5) + 
     geom_point(aes(x=tip, y=oecd,shape=oecd2),size=5,position = position_dodge(0.3)) +
     geom_text(aes(y=oecd,label=oecd),stat= "identity", position=position_dodge(0),vjust = -1,hjust=0.7,size=5)
## Warning: position_dodge requires non-overlapping x intervals

Okul turune gore 2003-2015 arasindaki degisimi

Matematik

   # 2012
                 
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Science high school",])
##   Freq   Mean s.e.    SD s.e
## 1   35 667.56 4.97 42.45 5.2
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Social Sciences High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   35 545.72 3.15 49.53 3.35
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: General high school",])
##   Freq   Mean s.e.    SD  s.e
## 1 1462 414.29 4.72 64.94 2.41
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian high school",])
##   Freq   Mean s.e.   SD  s.e
## 1 1050 532.63 6.77 75.4 3.77
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Police High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   68 647.21  6.3 42.24 5.52
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Teacher Training High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  207 577.31 5.51 45.55 3.22
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Technical High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   75 447.83 6.98 54.77 5.49
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Vocational High School",])
##   Freq  Mean s.e.    SD  s.e
## 1 1216 391.4 3.08 57.42 1.81
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Technical High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  123 474.43 9.21 55.89 4.09
      pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Vocational High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  279 450.43 8.01 58.97 3.63
      pisa.mean.pv(pvlabel="MATH",
                   data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: General high school" | 
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian high school" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Teacher Training High School",])
##   Freq   Mean s.e.    SD  s.e
## 1 2719 473.02 6.93 93.22 3.12
      pisa.mean.pv(pvlabel="MATH",
                   data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Technical High School" | 
                                            pisa_2012_stu_TUR$progn=="Turkey: Vocational High School" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Technical High School" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Vocational High School",])
##   Freq   Mean s.e.    SD  s.e
## 1 1693 409.71 3.76 64.69 2.08
  # 2009
                   

      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Science high school  ",])
##   Freq   Mean  s.e.    SD  s.e
## 1  100 614.12 15.27 59.42 5.14
      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Teacher Training High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1   67 612.68 7.31 45.94 2.71
      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: General high school  ",])
##   Freq   Mean s.e.   SD  s.e
## 1 1877 437.56 3.91 68.7 1.45
      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian high school ",])
##   Freq   Mean s.e.    SD s.e
## 1  715 562.66 7.49 62.43 4.9
      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Technical High Schoo ",])
##   Freq   Mean s.e.    SD  s.e
## 1  137 466.29  6.5 60.23 4.82
      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Vocational High School  ",])
##   Freq   Mean  s.e.   SD s.e
## 1  356 444.68 11.35 67.9 5.4
      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Technical High School ",])
##   Freq  Mean  s.e.   SD  s.e
## 1   53 468.6 12.08 67.5 6.94
      pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Vocational High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1 1254 394.33 6.46 66.03 3.48
      pisa.mean.pv(pvlabel="MATH",
                   data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: General high school  " | 
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian high school " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Teacher Training High School ",])
##   Freq  Mean s.e.   SD  s.e
## 1 2659 475.6 5.68 89.3 3.12
      pisa.mean.pv(pvlabel="MATH",
                   data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Vocational High School " | 
                                          pisa_2009_stu_TUR$PROGN=="TUR: Technical High School " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Technical High Schoo " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Vocational High School  ",])
##   Freq   Mean s.e.    SD  s.e
## 1 1800 412.15 5.57 71.52 2.86
   # 2006

      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: SCIENCE HIGH SCHOOLS",])
##   Freq   Mean s.e.    SD  s.e
## 1   35 678.59 2.66 57.89 2.98
      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: GENERAL HIGH SCHOOL",])
##   Freq   Mean s.e.    SD  s.e
## 1 2266 428.58 5.63 78.98 4.66
      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN HIGH SCHOOL",])
##   Freq   Mean  s.e.    SD  s.e
## 1  549 528.04 14.79 76.46 5.05
      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: HIGH SCHOOL WITH INTENSIVE FOREIGN LANGUAGE TEACHING",])
##   Freq   Mean s.e.    SD   s.e
## 1    9 535.93 5.13 57.74 12.44
      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN VOCATIONAL HIGH SCHOOLS",])
##   Freq  Mean  s.e.     SD   s.e
## 1  179 434.7 51.16 133.27 15.18
      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: VOCATIONAL HIGH SCHOOLS" | 
                                                         pisa_2006_stu_TUR$PROGN=="TUR: SECONDARY AND VOCATIONAL HIGH SCHOOL",])
##   Freq   Mean s.e.    SD  s.e
## 1 1788 386.23 3.29 63.36 1.59
      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: GENERAL HIGH SCHOOL" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN HIGH SCHOOL" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: HIGH SCHOOL WITH INTENSIVE FOREIGN LANGUAGE TEACHING",])
##   Freq   Mean s.e.    SD  s.e
## 1 2824 452.92 6.86 89.25 4.13
      pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN VOCATIONAL HIGH SCHOOLS" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: VOCATIONAL HIGH SCHOOLS" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: SECONDARY AND VOCATIONAL HIGH SCHOOL",])
##   Freq   Mean s.e.   SD  s.e
## 1 1967 391.05  5.3 74.8 6.66
   # 2003

      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: General high school (upper sec.)",])
##   Freq   Mean s.e.    SD  s.e
## 1 2414 405.71 4.98 79.84 1.69
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian technical high schools",])
##   Freq   Mean  s.e.    SD  s.e
## 1  258 448.69 10.92 78.84 3.82
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian vocational high schools",])
##   Freq   Mean  s.e.     SD  s.e
## 1  435 462.38 28.74 111.23 8.17
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Technical high schools",])
##   Freq   Mean  s.e.   SD  s.e
## 1  123 426.34 24.37 77.2 4.77
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Vocational high schools",])
##   Freq  Mean s.e.    SD  s.e
## 1  619 365.1 5.66 67.59 3.15
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: High school with foreign language (upper sec.)",])
##   Freq Mean  s.e.   SD   s.e
## 1  624  513 14.92 88.4 15.58
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian high school (upper sec.)",])
##   Freq   Mean  s.e.   SD s.e
## 1  200 539.36 20.57 77.2 8.5
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Science high schools (upper sec.)",])
##   Freq   Mean  s.e.    SD  s.e
## 1   63 694.46 10.64 57.08 5.55
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: General high school (upper sec.)" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Anatolian high school (upper sec.)" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: High school with foreign language (upper sec.)",])
##   Freq   Mean s.e.    SD  s.e
## 1 3238 433.91 7.94 95.36 5.46
      pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian technical high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Anatolian vocational high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Technical high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Vocational high schools",])
##   Freq   Mean  s.e.    SD  s.e
## 1 1435 399.81 12.58 94.35 8.98

FEN

   # 2012
                 
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Science high school",])
##   Freq   Mean s.e.    SD  s.e
## 1   35 605.05 6.82 44.38 5.13
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Social Sciences High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   35 551.16 4.29 49.69 5.11
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: General high school",])
##   Freq   Mean s.e.    SD  s.e
## 1 1462 436.79 4.47 62.09 2.38
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian high school",])
##   Freq   Mean s.e.    SD  s.e
## 1 1050 533.81 5.48 64.38 3.05
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Police High School",])
##   Freq  Mean s.e.    SD  s.e
## 1   68 587.6 6.99 39.86 5.72
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Teacher Training High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  207 566.27 3.78 42.84 1.67
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Technical High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   75 456.22 7.18 51.85 4.39
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Vocational High School",])
##   Freq   Mean s.e.    SD  s.e
## 1 1216 416.86  3.7 57.01 1.68
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Technical High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  123 481.55 7.09 51.91 4.37
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Vocational High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  279 476.68 8.83 58.63 4.11
      pisa.mean.pv(pvlabel="SCIE",
                   data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: General high school" | 
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian high school" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Teacher Training High School",])
##   Freq   Mean s.e.    SD  s.e
## 1 2719 484.62 5.43 80.57 2.15
      pisa.mean.pv(pvlabel="SCIE",
                   data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Technical High School" | 
                                            pisa_2012_stu_TUR$progn=="Turkey: Vocational High School" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Technical High School" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Vocational High School",])
##   Freq   Mean s.e.    SD  s.e
## 1 1693 433.23 3.94 62.58 2.25
  # 2009
                   

      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Science high school  ",])
##   Freq   Mean s.e.    SD  s.e
## 1  100 575.93 11.4 55.15 6.28
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Teacher Training High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1   67 560.45 6.63 48.03 3.82
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: General high school  ",])
##   Freq   Mean s.e.    SD s.e
## 1 1877 449.37 3.61 62.83 1.2
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian high school ",])
##   Freq   Mean s.e.    SD  s.e
## 1  715 546.91 4.96 53.32 3.59
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Technical High Schoo ",])
##   Freq   Mean s.e.    SD  s.e
## 1  137 469.73 8.18 59.96 5.46
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Vocational High School  ",])
##   Freq   Mean s.e.    SD  s.e
## 1  356 465.11 9.33 61.54 3.68
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Technical High School ",])
##   Freq   Mean  s.e.    SD  s.e
## 1   53 442.87 10.88 62.66 5.82
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Vocational High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1 1254 415.18 5.83 64.02 3.44
      pisa.mean.pv(pvlabel="SCIE",
                   data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: General high school  " | 
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian high school " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Teacher Training High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1 2659 478.36 4.48 75.08 2.25
      pisa.mean.pv(pvlabel="SCIE",
                   data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Vocational High School " | 
                                          pisa_2009_stu_TUR$PROGN=="TUR: Technical High School " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Technical High Schoo " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Vocational High School  ",])
##   Freq   Mean s.e.    SD s.e
## 1 1800 430.19 4.75 67.24 2.2
   # 2006

      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: SCIENCE HIGH SCHOOLS",])
##   Freq   Mean s.e. SD  s.e
## 1   35 590.05 6.34 46 2.97
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: GENERAL HIGH SCHOOL",])
##   Freq   Mean s.e.    SD  s.e
## 1 2266 429.49 4.81 70.66 3.99
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN HIGH SCHOOL",])
##   Freq  Mean  s.e.    SD  s.e
## 1  549 520.6 15.54 68.81 7.95
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: HIGH SCHOOL WITH INTENSIVE FOREIGN LANGUAGE TEACHING",])
##   Freq   Mean  s.e.    SD  s.e
## 1    9 510.67 11.27 45.98 11.2
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN VOCATIONAL HIGH SCHOOLS",])
##   Freq   Mean  s.e.     SD   s.e
## 1  179 433.12 41.46 110.57 12.49
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: VOCATIONAL HIGH SCHOOLS" | 
                                                         pisa_2006_stu_TUR$PROGN=="TUR: SECONDARY AND VOCATIONAL HIGH SCHOOL",])
##   Freq   Mean s.e.   SD  s.e
## 1 1788 389.47 3.41 59.2 1.67
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: GENERAL HIGH SCHOOL" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN HIGH SCHOOL" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: HIGH SCHOOL WITH INTENSIVE FOREIGN LANGUAGE TEACHING",])
##   Freq   Mean s.e.   SD  s.e
## 1 2824 451.72 5.73 80.3 3.64
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN VOCATIONAL HIGH SCHOOLS" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: VOCATIONAL HIGH SCHOOLS" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: SECONDARY AND VOCATIONAL HIGH SCHOOL",])
##   Freq   Mean s.e.    SD  s.e
## 1 1967 393.82 4.77 67.41 4.99
   # 2003

      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: General high school (upper sec.)",])
##   Freq   Mean s.e.    SD  s.e
## 1 2414 418.49 4.57 73.34 1.64
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian technical high schools",])
##   Freq  Mean s.e.    SD  s.e
## 1  258 446.5 8.77 72.02 5.65
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian vocational high schools",])
##   Freq   Mean  s.e.     SD s.e
## 1  435 469.36 26.19 104.34 7.5
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Technical high schools",])
##   Freq   Mean  s.e.    SD  s.e
## 1  123 426.79 16.59 72.65 4.86
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Vocational high schools",])
##   Freq   Mean s.e.    SD  s.e
## 1  619 381.04 5.36 63.95 2.54
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: High school with foreign language (upper sec.)",])
##   Freq   Mean  s.e.    SD   s.e
## 1  624 513.73 13.71 87.91 12.27
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian high school (upper sec.)",])
##   Freq   Mean  s.e.    SD  s.e
## 1  200 541.79 19.35 75.81 9.41
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Science high schools (upper sec.)",])
##   Freq   Mean s.e.    SD  s.e
## 1   63 669.17  8.1 51.53 4.23
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: General high school (upper sec.)" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Anatolian high school (upper sec.)" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: High school with foreign language (upper sec.)",])
##   Freq   Mean s.e.   SD s.e
## 1 3238 443.91 7.04 88.6 4.9
      pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian technical high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Anatolian vocational high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Technical high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Vocational high schools",])
##   Freq   Mean  s.e.    SD s.e
## 1 1435 411.48 11.64 87.69 8.4

OKUMA

   # 2012
                 
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Science high school",])
##   Freq   Mean s.e.    SD  s.e
## 1   35 630.92 5.34 43.78 2.63
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Social Sciences High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   35 573.93 6.55 46.77 3.33
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: General high school",])
##   Freq   Mean s.e.    SD  s.e
## 1 1462 448.83 4.96 67.36 2.35
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian high school",])
##   Freq   Mean s.e.    SD  s.e
## 1 1050 550.38 6.39 68.33 3.61
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Police High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   68 592.49 7.32 45.68 5.41
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Teacher Training High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  207 572.96 8.11 48.57 2.99
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Technical High School",])
##   Freq   Mean s.e.    SD  s.e
## 1   75 454.57 7.83 56.46 5.56
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Vocational High School",])
##   Freq   Mean s.e. SD  s.e
## 1 1216 428.78 5.11 66 2.26
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Technical High School",])
##   Freq   Mean s.e.    SD  s.e
## 1  123 488.84 4.07 46.13 3.47
      pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Anatolian Vocational High School",])
##   Freq   Mean s.e.    SD s.e
## 1  279 495.66  9.1 60.87 2.6
      pisa.mean.pv(pvlabel="READ",
                   data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: General high school" | 
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian high school" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Teacher Training High School",])
##   Freq   Mean s.e.    SD  s.e
## 1 2719 498.01 5.71 84.93 2.99
      pisa.mean.pv(pvlabel="READ",
                   data=pisa_2012_stu_TUR[pisa_2012_stu_TUR$progn=="Turkey: Technical High School" | 
                                            pisa_2012_stu_TUR$progn=="Turkey: Vocational High School" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Technical High School" |
                                            pisa_2012_stu_TUR$progn=="Turkey: Anatolian Vocational High School",])
##   Freq   Mean s.e.    SD s.e
## 1 1693 445.39  4.8 69.24 2.5
  # 2009
                   

      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Science high school  ",])
##   Freq   Mean s.e.    SD  s.e
## 1  100 570.53 9.46 51.33 5.15
      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Teacher Training High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1   67 568.88 5.75 49.37 4.34
      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: General high school  ",])
##   Freq   Mean s.e.    SD  s.e
## 1 1877 464.87 4.17 66.65 1.11
      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian high school ",])
##   Freq  Mean s.e.   SD  s.e
## 1  715 550.3 4.68 53.2 2.72
      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Technical High Schoo ",])
##   Freq   Mean s.e.    SD  s.e
## 1  137 467.48 7.28 54.86 3.49
      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Vocational High School  ",])
##   Freq   Mean  s.e.    SD  s.e
## 1  356 484.78 10.71 65.62 4.42
      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Technical High School ",])
##   Freq  Mean s.e.    SD  s.e
## 1   53 438.1 9.83 65.29 6.78
      pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Vocational High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1 1254 423.34 5.43 65.38 3.25
      pisa.mean.pv(pvlabel="READ",
                   data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: General high school  " | 
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian high school " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Teacher Training High School ",])
##   Freq   Mean s.e.    SD  s.e
## 1 2659 490.44 4.36 74.43 1.78
      pisa.mean.pv(pvlabel="READ",
                   data=pisa_2009_stu_TUR[pisa_2009_stu_TUR$PROGN=="TUR: Vocational High School " | 
                                          pisa_2009_stu_TUR$PROGN=="TUR: Technical High School " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Technical High Schoo " |
                                          pisa_2009_stu_TUR$PROGN=="TUR: Anatolian Vocational High School  ",])
##   Freq   Mean s.e.    SD  s.e
## 1 1800 439.47 5.02 69.55 2.64
   # 2006

      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: SCIENCE HIGH SCHOOLS",])
##   Freq   Mean s.e.    SD  s.e
## 1   35 547.78 5.28 49.88 4.59
      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: GENERAL HIGH SCHOOL",])
##   Freq   Mean s.e.    SD  s.e
## 1 2266 460.67  4.9 77.96 3.16
      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN HIGH SCHOOL",])
##   Freq   Mean  s.e.   SD  s.e
## 1  549 536.25 10.97 68.7 4.82
      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: HIGH SCHOOL WITH INTENSIVE FOREIGN LANGUAGE TEACHING",])
##   Freq   Mean  s.e.    SD  s.e
## 1    9 563.11 14.31 41.76 9.58
      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN VOCATIONAL HIGH SCHOOLS",])
##   Freq   Mean  s.e.     SD   s.e
## 1  179 456.87 39.73 112.63 10.42
      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: VOCATIONAL HIGH SCHOOLS" | 
                                                         pisa_2006_stu_TUR$PROGN=="TUR: SECONDARY AND VOCATIONAL HIGH SCHOOL",])
##   Freq  Mean s.e.    SD  s.e
## 1 1788 414.6 5.28 76.95 2.32
      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: GENERAL HIGH SCHOOL" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN HIGH SCHOOL" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: HIGH SCHOOL WITH INTENSIVE FOREIGN LANGUAGE TEACHING",])
##   Freq   Mean s.e.   SD  s.e
## 1 2824 479.25 5.15 82.5 3.32
      pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR[pisa_2006_stu_TUR$PROGN=="TUR: ANATOLIAN VOCATIONAL HIGH SCHOOLS" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: VOCATIONAL HIGH SCHOOLS" |
                                                         pisa_2006_stu_TUR$PROGN=="TUR: SECONDARY AND VOCATIONAL HIGH SCHOOL",])
##   Freq   Mean s.e.    SD  s.e
## 1 1967 418.81 6.33 82.19 4.04
   # 2003

      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: General high school (upper sec.)",])
##   Freq   Mean s.e.    SD  s.e
## 1 2414 426.71 5.06 76.03 2.05
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian technical high schools",])
##   Freq   Mean s.e.   SD  s.e
## 1  258 452.12 10.1 71.1 5.15
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian vocational high schools",])
##   Freq   Mean  s.e.   SD  s.e
## 1  435 482.44 23.12 97.5 7.68
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Technical high schools",])
##   Freq   Mean  s.e.    SD  s.e
## 1  123 426.96 21.89 78.54 5.26
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Vocational high schools",])
##   Freq   Mean s.e.    SD  s.e
## 1  619 396.94 5.11 70.91 3.58
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: High school with foreign language (upper sec.)",])
##   Freq   Mean  s.e.    SD   s.e
## 1  624 516.61 14.16 84.06 12.56
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian high school (upper sec.)",])
##   Freq   Mean  s.e.    SD  s.e
## 1  200 537.97 20.95 76.65 7.56
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Science high schools (upper sec.)",])
##   Freq   Mean s.e.    SD  s.e
## 1   63 645.42 5.98 56.89 6.48
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: General high school (upper sec.)" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Anatolian high school (upper sec.)" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: High school with foreign language (upper sec.)",])
##   Freq   Mean s.e.    SD  s.e
## 1 3238 450.28 6.98 88.08 4.79
      pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR[pisa_2003_stu_TUR$PROGN=="TUR: Anatolian technical high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Anatolian vocational high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Technical high schools" |
                                                         pisa_2003_stu_TUR$PROGN=="TUR: Vocational high schools",])
##   Freq   Mean  s.e.    SD s.e
## 1 1435 425.22 10.95 88.26 7.1

SES ve PISA Puani

Yillar arasinda karsilastirma yapabilmek icin ogrencileri ESCS degerine gore 4farkli kategoriye ayirdik. Bunun icin gecmis senelere ait hesaplanmis 2015 ESCS degeri ile karsilastirilabilir olan “escs_trend” degiskenini kullandik.

  pisa_2015_stu_TUR$ESCS_cat <- factor(recode(pisa_2015_stu_TUR$ESCS,
                                              recodes="lo:-1='Dusuk (ESCS < -1)';
                                                      -1:0='Orta (-1 < ESCS < 0)';
                                                      0:hi='Yuksek(ESCS>0'"))

  pisa_2012_stu_TUR$ESCS_cat <- factor(recode(pisa_2012_stu_TUR$escs_trend,
                                              recodes="lo:-1='Dusuk (ESCS < -1)';
                                                      -1:0='Orta (-1 < ESCS < 0)';
                                                      0:hi='Yuksek(ESCS>0'"))

  pisa_2009_stu_TUR$ESCS_cat <- factor(recode(pisa_2009_stu_TUR$escs_trend,
                                              recodes="lo:-1='Dusuk (ESCS < -1)';
                                                      -1:0='Orta (-1 < ESCS < 0)';
                                                      0:hi='Yuksek(ESCS>0'"))

  pisa_2006_stu_TUR$ESCS_cat <- factor(recode(pisa_2006_stu_TUR$escs_trend,
                                              recodes="lo:-1='Dusuk (ESCS < -1)';
                                                      -1:0='Orta (-1 < ESCS < 0)';
                                                      0:hi='Yuksek(ESCS>0'"))

  pisa_2003_stu_TUR$ESCS_cat <- factor(recode(pisa_2003_stu_TUR$escs_trend,
                                              recodes="lo:-1='Dusuk (ESCS < -1)';
                                                      -1:0='Orta (-1 < ESCS < 0)';
                                                      0:hi='Yuksek(ESCS>0'"))


  pisa.table(variable="ESCS_cat",data=pisa_2003_stu_TUR)
##               ESCS_cat Freq Percentage Std.err.
## 1    Dusuk (ESCS < -1) 3448      72.14     2.06
## 2 Orta (-1 < ESCS < 0)  828      15.83     0.93
## 3        Yuksek(ESCS>0  569      12.03     1.55
  pisa.table(variable="ESCS_cat",data=pisa_2006_stu_TUR)
##               ESCS_cat Freq Percentage Std.err.
## 1    Dusuk (ESCS < -1) 3519      72.33     1.52
## 2 Orta (-1 < ESCS < 0)  894      17.14     0.75
## 3        Yuksek(ESCS>0  521      10.53     1.06
  pisa.table(variable="ESCS_cat",data=pisa_2009_stu_TUR)
##               ESCS_cat Freq Percentage Std.err.
## 1    Dusuk (ESCS < -1) 3384      67.88     1.50
## 2 Orta (-1 < ESCS < 0)  956      19.32     0.82
## 3        Yuksek(ESCS>0  625      12.80     1.03
  pisa.table(variable="ESCS_cat",data=pisa_2012_stu_TUR)
##               ESCS_cat Freq Percentage Std.err.
## 1    Dusuk (ESCS < -1) 3387      70.59     1.29
## 2 Orta (-1 < ESCS < 0)  835      17.42     0.82
## 3        Yuksek(ESCS>0  584      11.99     0.95
  pisa2015.table(variable="ESCS_cat",data=pisa_2015_stu_TUR)
##               ESCS_cat Freq Percentage Std.err.
## 1    Dusuk (ESCS < -1) 3820      64.38     1.67
## 2 Orta (-1 < ESCS < 0) 1286      22.26     0.79
## 3        Yuksek(ESCS>0  753      13.36     1.21
Yil Dusuk Orta Yukesek
2003 %72.14 %15.83 %12.03
2006 %72.33 %17.14 %10.53
2009 %67.88 %19.32 %12.80
2012 %70.59 %17.42 %11.99
2015 %64.38 %22.26 %13.36

Matematik

  m2003 <- pisa.mean.pv(pvlabel="MATH",data=pisa_2003_stu_TUR,by="ESCS_cat")[1:3,]
  m2006 <- pisa.mean.pv(pvlabel="MATH",data=pisa_2006_stu_TUR,by="ESCS_cat")[1:3,]
  m2009<- pisa.mean.pv(pvlabel="MATH",data=pisa_2009_stu_TUR,by="ESCS_cat")[1:3,]
  m2012 <- pisa.mean.pv(pvlabel="MATH",data=pisa_2012_stu_TUR,by="ESCS_cat")[1:3,]
  m2015 <- pisa2015.mean.pv(pvlabel="MATH",data=pisa_2015_stu_TUR,by="ESCS_cat")[1:3,]
      
   m <- rbind(m2003,m2006,m2009,m2012,m2015)
   m$year <- c(rep(1,3),rep(2,3),rep(3,3),rep(4,3),rep(5,3))
   m$Mean2 <- round(m$Mean)

   ggplot(m, aes(x=year, y=Mean,shape=ESCS_cat)) +
    theme_bw() +
    geom_errorbar(aes(ymin=Mean-1.96*s.e., ymax=Mean+1.96*s.e.),position = position_dodge(0.2),lty=2,colour="gray50",width=.3) +
    geom_point(size=4, fill="black",position = position_dodge(0.2)) +
    geom_line(position = position_dodge(0.2))+
    scale_x_discrete(limit = 1:5,labels=c("2003","2006","2009","2012","2015"))  +
    labs(title = "                                MATEMATIK", 
          x = "YIL", y = "PISA PUANI",
          shape=" ESCS Kategori")+
    theme(axis.title= element_text(size = 15),      
          axis.text= element_text(size = 12),
          title = element_text(size = 20),
          legend.justification=c(-0.5,-0.2),
          legend.position=c(0.75,.7),
          legend.text=element_text(size = 12),
          legend.title=element_text(size = 12)
          ) +
     annotation_custom(grob = textGrob("@pisa_turkiye"),  
        xmin = 0.50, xmax = 0.85, ymin =575, ymax = 575)+
    geom_text(aes(y=Mean,label=Mean2),stat= "identity", position=position_dodge(.2),vjust = -1.5,hjust=1.2)

FEN

  m2003 <- pisa.mean.pv(pvlabel="SCIE",data=pisa_2003_stu_TUR,by="ESCS_cat")[1:3,]
  m2006 <- pisa.mean.pv(pvlabel="SCIE",data=pisa_2006_stu_TUR,by="ESCS_cat")[1:3,]
  m2009<- pisa.mean.pv(pvlabel="SCIE",data=pisa_2009_stu_TUR,by="ESCS_cat")[1:3,]
  m2012 <- pisa.mean.pv(pvlabel="SCIE",data=pisa_2012_stu_TUR,by="ESCS_cat")[1:3,]
  m2015 <- pisa2015.mean.pv(pvlabel="SCIE",data=pisa_2015_stu_TUR,by="ESCS_cat")[1:3,]
      
   m <- rbind(m2003,m2006,m2009,m2012,m2015)
   m$year <- c(rep(1,3),rep(2,3),rep(3,3),rep(4,3),rep(5,3))
   m$Mean2 <- round(m$Mean)

   ggplot(m, aes(x=year, y=Mean,shape=ESCS_cat)) +
    theme_bw() +
    geom_errorbar(aes(ymin=Mean-1.96*s.e., ymax=Mean+1.96*s.e.),position = position_dodge(0.2),lty=2,colour="gray50",width=.3) +
    geom_point(size=4, fill="black",position = position_dodge(0.2)) +
    geom_line(position = position_dodge(0.2))+
    scale_x_discrete(limit = 1:5,labels=c("2003","2006","2009","2012","2015"))  +
    labs(title = "                                FEN", 
          x = "YIL", y = "PISA PUANI",
          shape=" ESCS Kategori")+
    theme(axis.title= element_text(size = 15),      
          axis.text= element_text(size = 12),
          title = element_text(size = 20),
          legend.justification=c(-0.5,-0.2),
          legend.position=c(0.75,.7),
          legend.text=element_text(size = 12),
          legend.title=element_text(size = 12)
          ) +
     annotation_custom(grob = textGrob("@pisa_turkiye"),  
        xmin = 0.50, xmax = 0.85, ymin =575, ymax = 575)+
    geom_text(aes(y=Mean,label=Mean2),stat= "identity", position=position_dodge(.2),vjust = -1.5,hjust=1.2)

OKUMA

  m2003 <- pisa.mean.pv(pvlabel="READ",data=pisa_2003_stu_TUR,by="ESCS_cat")[1:3,]
  m2006 <- pisa.mean.pv(pvlabel="READ",data=pisa_2006_stu_TUR,by="ESCS_cat")[1:3,]
  m2009<- pisa.mean.pv(pvlabel="READ",data=pisa_2009_stu_TUR,by="ESCS_cat")[1:3,]
  m2012 <- pisa.mean.pv(pvlabel="READ",data=pisa_2012_stu_TUR,by="ESCS_cat")[1:3,]
  m2015 <- pisa2015.mean.pv(pvlabel="READ",data=pisa_2015_stu_TUR,by="ESCS_cat")[1:3,]
      
   m <- rbind(m2003,m2006,m2009,m2012,m2015)
   m$year <- c(rep(1,3),rep(2,3),rep(3,3),rep(4,3),rep(5,3))
   m$Mean2 <- round(m$Mean)

   ggplot(m, aes(x=year, y=Mean,shape=ESCS_cat)) +
    theme_bw() +
    geom_errorbar(aes(ymin=Mean-1.96*s.e., ymax=Mean+1.96*s.e.),position = position_dodge(0.2),lty=2,colour="gray50",width=.3) +
    geom_point(size=4, fill="black",position = position_dodge(0.2)) +
    geom_line(position = position_dodge(0.2))+
    scale_x_discrete(limit = 1:5,labels=c("2003","2006","2009","2012","2015"))  +
    labs(title = "                                OKUMA BECERILERI", 
          x = "YIL", y = "PISA PUANI",
          shape=" ESCS Kategori")+
    theme(axis.title= element_text(size = 15),      
          axis.text= element_text(size = 12),
          title = element_text(size = 20),
          legend.justification=c(-0.5,-0.2),
          legend.position=c(0.75,.7),
          legend.text=element_text(size = 12),
          legend.title=element_text(size = 12)
          ) +
     annotation_custom(grob = textGrob("@pisa_turkiye"),  
        xmin = 0.50, xmax = 0.85, ymin =565, ymax = 575)+
    geom_text(aes(y=Mean,label=Mean2),stat= "identity", position=position_dodge(.2),vjust = -1.5,hjust=1.2)