#1 school - student’s school (binary: ‘GP’ - Gabriel Pereira or ‘MS’ - Mousinho da Silveira) #2 sex - student’s sex (binary: ‘F’ - female or ‘M’ - male) #3 age - student’s age (numeric: from 15 to 22) #4 address - student’s home address type (binary: ‘U’ - urban or ‘R’ - rural) #5 famsize - family size (binary: ‘LE3’ - less or equal to 3 or ‘GT3’ - greater than 3) #6 Pstatus - parent’s cohabitation status (binary: ‘T’ - living together or ‘A’ - apart) #7 Medu - mother’s education (numeric: 0 - none, 1. - primary education (4th grade), 2. 5th to 9th grade, 3, secondary education or 4 higher education) #8 Fedu - father’s education (numeric: 0 - none, 1 - primary education (4th grade), 2 5th to 9th grade, 3 secondary education or 4 higher education) #9 Mjob - mother’s job (nominal: ‘teacher’, ‘health’ care related, civil ‘services’ (e.g. administrative or police), ‘at_home’ or ‘other’) #10 Fjob - father’s job (nominal: ‘teacher’, ‘health’ care related, civil ‘services’ (e.g. administrative or police), ‘at_home’ or ‘other’) #11 reason - reason to choose this school (nominal: close to ‘home’, school ‘reputation’, ‘course’ preference or ‘other’) #12 guardian - student’s guardian (nominal: ‘mother’, ‘father’ or ‘other’) #13 traveltime - home to school travel time (numeric: 1 - <15 min., 2 - 15 to 30 min., 3 - 30 min. to 1 hour, or 4 - >1 hour) #14 studytime - weekly study time (numeric: 1 - <2 hours, 2 - 2 to 5 hours, 3 - 5 to 10 hours, or 4 - >10 hours) #15 failures - number of past class failures (numeric: n if 1<=n<3, else 4) #16 schoolsup - extra educational support (binary: yes or no) #17 famsup - family educational support (binary: yes or no) #18 paid - extra paid classes within the course subject (Math or Portuguese) (binary: yes or no) #19 activities - extra-curricular activities (binary: yes or no) #20 nursery - attended nursery school (binary: yes or no) #21 higher - wants to take higher education (binary: yes or no) #22 internet - Internet access at home (binary: yes or no) #23 romantic - with a romantic relationship (binary: yes or no) #24 famrel - quality of family relationships (numeric: from 1 - very bad to 5 - excellent) #25 freetime - free time after school (numeric: from 1 - very low to 5 - very high) #26 goout - going out with friends (numeric: from 1 - very low to 5 - very high) #27 Dalc - workday alcohol consumption (numeric: from 1 - very low to 5 - very high) #28 Walc - weekend alcohol consumption (numeric: from 1 - very low to 5 - very high) #29 health - current health status (numeric: from 1 - very bad to 5 - very good) #30 absences - number of school absences (numeric: from 0 to 93)
setwd("~/Data 110 Folder")
student_df <- read.csv("student-mat.csv")
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.1.3
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.6 v dplyr 1.0.7
## v tidyr 1.1.4 v stringr 1.4.0
## v readr 2.1.1 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(dplyr)
library(ggpubr)
## Warning: package 'ggpubr' was built under R version 4.1.3
library(ggplot2)
library(psych)
## Warning: package 'psych' was built under R version 4.1.3
##
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
library(corrplot)
## corrplot 0.92 loaded
library(RColorBrewer)
library(highcharter)
## Warning: package 'highcharter' was built under R version 4.1.3
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Highcharts (www.highcharts.com) is a Highsoft software product which is
## not free for commercial and Governmental use
#Head, Tail, and Dimension
head(student_df)
## school sex age address famsize Pstatus Medu Fedu Mjob Fjob reason
## 1 GP F 18 U GT3 A 4 4 at_home teacher course
## 2 GP F 17 U GT3 T 1 1 at_home other course
## 3 GP F 15 U LE3 T 1 1 at_home other other
## 4 GP F 15 U GT3 T 4 2 health services home
## 5 GP F 16 U GT3 T 3 3 other other home
## 6 GP M 16 U LE3 T 4 3 services other reputation
## guardian traveltime studytime failures schoolsup famsup paid activities
## 1 mother 2 2 0 yes no no no
## 2 father 1 2 0 no yes no no
## 3 mother 1 2 3 yes no yes no
## 4 mother 1 3 0 no yes yes yes
## 5 father 1 2 0 no yes yes no
## 6 mother 1 2 0 no yes yes yes
## nursery higher internet romantic famrel freetime goout Dalc Walc health
## 1 yes yes no no 4 3 4 1 1 3
## 2 no yes yes no 5 3 3 1 1 3
## 3 yes yes yes no 4 3 2 2 3 3
## 4 yes yes yes yes 3 2 2 1 1 5
## 5 yes yes no no 4 3 2 1 2 5
## 6 yes yes yes no 5 4 2 1 2 5
## absences G1 G2 G3
## 1 6 5 6 6
## 2 4 5 5 6
## 3 10 7 8 10
## 4 2 15 14 15
## 5 4 6 10 10
## 6 10 15 15 15
tail(student_df)
## school sex age address famsize Pstatus Medu Fedu Mjob Fjob reason
## 390 MS F 18 U GT3 T 1 1 other other course
## 391 MS M 20 U LE3 A 2 2 services services course
## 392 MS M 17 U LE3 T 3 1 services services course
## 393 MS M 21 R GT3 T 1 1 other other course
## 394 MS M 18 R LE3 T 3 2 services other course
## 395 MS M 19 U LE3 T 1 1 other at_home course
## guardian traveltime studytime failures schoolsup famsup paid activities
## 390 mother 2 2 1 no no no yes
## 391 other 1 2 2 no yes yes no
## 392 mother 2 1 0 no no no no
## 393 other 1 1 3 no no no no
## 394 mother 3 1 0 no no no no
## 395 father 1 1 0 no no no no
## nursery higher internet romantic famrel freetime goout Dalc Walc health
## 390 yes yes no no 1 1 1 1 1 5
## 391 yes yes no no 5 5 4 4 5 4
## 392 no yes yes no 2 4 5 3 4 2
## 393 no yes no no 5 5 3 3 3 3
## 394 no yes yes no 4 4 1 3 4 5
## 395 yes yes yes no 3 2 3 3 3 5
## absences G1 G2 G3
## 390 0 6 5 0
## 391 11 9 9 9
## 392 3 14 16 16
## 393 3 10 8 7
## 394 0 11 12 10
## 395 5 8 9 9
dim(student_df)
## [1] 395 33
view(student_df)
str(student_df)
## 'data.frame': 395 obs. of 33 variables:
## $ school : chr "GP" "GP" "GP" "GP" ...
## $ sex : chr "F" "F" "F" "F" ...
## $ age : int 18 17 15 15 16 16 16 17 15 15 ...
## $ address : chr "U" "U" "U" "U" ...
## $ famsize : chr "GT3" "GT3" "LE3" "GT3" ...
## $ Pstatus : chr "A" "T" "T" "T" ...
## $ Medu : int 4 1 1 4 3 4 2 4 3 3 ...
## $ Fedu : int 4 1 1 2 3 3 2 4 2 4 ...
## $ Mjob : chr "at_home" "at_home" "at_home" "health" ...
## $ Fjob : chr "teacher" "other" "other" "services" ...
## $ reason : chr "course" "course" "other" "home" ...
## $ guardian : chr "mother" "father" "mother" "mother" ...
## $ traveltime: int 2 1 1 1 1 1 1 2 1 1 ...
## $ studytime : int 2 2 2 3 2 2 2 2 2 2 ...
## $ failures : int 0 0 3 0 0 0 0 0 0 0 ...
## $ schoolsup : chr "yes" "no" "yes" "no" ...
## $ famsup : chr "no" "yes" "no" "yes" ...
## $ paid : chr "no" "no" "yes" "yes" ...
## $ activities: chr "no" "no" "no" "yes" ...
## $ nursery : chr "yes" "no" "yes" "yes" ...
## $ higher : chr "yes" "yes" "yes" "yes" ...
## $ internet : chr "no" "yes" "yes" "yes" ...
## $ romantic : chr "no" "no" "no" "yes" ...
## $ famrel : int 4 5 4 3 4 5 4 4 4 5 ...
## $ freetime : int 3 3 3 2 3 4 4 1 2 5 ...
## $ goout : int 4 3 2 2 2 2 4 4 2 1 ...
## $ Dalc : int 1 1 2 1 1 1 1 1 1 1 ...
## $ Walc : int 1 1 3 1 2 2 1 1 1 1 ...
## $ health : int 3 3 3 5 5 5 3 1 1 5 ...
## $ absences : int 6 4 10 2 4 10 0 6 0 0 ...
## $ G1 : int 5 5 7 15 6 15 12 6 16 14 ...
## $ G2 : int 6 5 8 14 10 15 12 5 18 15 ...
## $ G3 : int 6 6 10 15 10 15 11 6 19 15 ...
unique(student_df)
## school sex age address famsize Pstatus Medu Fedu Mjob Fjob
## 1 GP F 18 U GT3 A 4 4 at_home teacher
## 2 GP F 17 U GT3 T 1 1 at_home other
## 3 GP F 15 U LE3 T 1 1 at_home other
## 4 GP F 15 U GT3 T 4 2 health services
## 5 GP F 16 U GT3 T 3 3 other other
## 6 GP M 16 U LE3 T 4 3 services other
## 7 GP M 16 U LE3 T 2 2 other other
## 8 GP F 17 U GT3 A 4 4 other teacher
## 9 GP M 15 U LE3 A 3 2 services other
## 10 GP M 15 U GT3 T 3 4 other other
## 11 GP F 15 U GT3 T 4 4 teacher health
## 12 GP F 15 U GT3 T 2 1 services other
## 13 GP M 15 U LE3 T 4 4 health services
## 14 GP M 15 U GT3 T 4 3 teacher other
## 15 GP M 15 U GT3 A 2 2 other other
## 16 GP F 16 U GT3 T 4 4 health other
## 17 GP F 16 U GT3 T 4 4 services services
## 18 GP F 16 U GT3 T 3 3 other other
## 19 GP M 17 U GT3 T 3 2 services services
## 20 GP M 16 U LE3 T 4 3 health other
## 21 GP M 15 U GT3 T 4 3 teacher other
## 22 GP M 15 U GT3 T 4 4 health health
## 23 GP M 16 U LE3 T 4 2 teacher other
## 24 GP M 16 U LE3 T 2 2 other other
## 25 GP F 15 R GT3 T 2 4 services health
## 26 GP F 16 U GT3 T 2 2 services services
## 27 GP M 15 U GT3 T 2 2 other other
## 28 GP M 15 U GT3 T 4 2 health services
## 29 GP M 16 U LE3 A 3 4 services other
## 30 GP M 16 U GT3 T 4 4 teacher teacher
## 31 GP M 15 U GT3 T 4 4 health services
## 32 GP M 15 U GT3 T 4 4 services services
## 33 GP M 15 R GT3 T 4 3 teacher at_home
## 34 GP M 15 U LE3 T 3 3 other other
## 35 GP M 16 U GT3 T 3 2 other other
## 36 GP F 15 U GT3 T 2 3 other other
## 37 GP M 15 U LE3 T 4 3 teacher services
## 38 GP M 16 R GT3 A 4 4 other teacher
## 39 GP F 15 R GT3 T 3 4 services health
## 40 GP F 15 R GT3 T 2 2 at_home other
## 41 GP F 16 U LE3 T 2 2 other other
## 42 GP M 15 U LE3 T 4 4 teacher other
## 43 GP M 15 U GT3 T 4 4 services teacher
## 44 GP M 15 U GT3 T 2 2 services services
## 45 GP F 16 U LE3 T 2 2 other at_home
## 46 GP F 15 U LE3 A 4 3 other other
## 47 GP F 16 U LE3 A 3 3 other services
## 48 GP M 16 U GT3 T 4 3 health services
## 49 GP M 15 U GT3 T 4 2 teacher other
## 50 GP F 15 U GT3 T 4 4 services teacher
## 51 GP F 16 U LE3 T 2 2 services services
## 52 GP F 15 U LE3 T 4 2 health other
## 53 GP M 15 U LE3 A 4 2 health health
## 54 GP F 15 U GT3 T 4 4 services services
## 55 GP F 15 U LE3 A 3 3 other other
## 56 GP F 16 U GT3 A 2 1 other other
## 57 GP F 15 U GT3 A 4 3 services services
## 58 GP M 15 U GT3 T 4 4 teacher health
## 59 GP M 15 U LE3 T 1 2 other at_home
## 60 GP F 16 U GT3 T 4 2 services other
## 61 GP F 16 R GT3 T 4 4 health teacher
## 62 GP F 16 U GT3 T 1 1 services services
## 63 GP F 16 U LE3 T 1 2 other services
## 64 GP F 16 U GT3 T 4 3 teacher health
## 65 GP F 15 U LE3 T 4 3 services services
## 66 GP F 16 U LE3 T 4 3 teacher services
## 67 GP M 15 U GT3 A 4 4 other services
## 68 GP F 16 U GT3 T 3 1 services other
## 69 GP F 15 R LE3 T 2 2 health services
## 70 GP F 15 R LE3 T 3 1 other other
## 71 GP M 16 U GT3 T 3 1 other other
## 72 GP M 15 U GT3 T 4 2 other other
## 73 GP F 15 R GT3 T 1 1 other other
## 74 GP M 16 U GT3 T 3 1 other other
## 75 GP F 16 U GT3 T 3 3 other services
## 76 GP M 15 U GT3 T 4 3 teacher other
## 77 GP M 15 U GT3 T 4 0 teacher other
## 78 GP F 16 U GT3 T 2 2 other other
## 79 GP M 17 U GT3 T 2 1 other other
## 80 GP F 16 U GT3 T 3 4 at_home other
## 81 GP M 15 U GT3 T 2 3 other services
## 82 GP M 15 U GT3 T 2 3 other other
## 83 GP F 15 U LE3 T 3 2 services other
## 84 GP M 15 U LE3 T 2 2 services services
## 85 GP F 15 U GT3 T 1 1 other other
## 86 GP F 15 U GT3 T 4 4 services services
## 87 GP F 16 U LE3 T 2 2 at_home other
## 88 GP F 15 U GT3 T 4 2 other other
## 89 GP M 16 U GT3 T 2 2 services other
## 90 GP M 16 U LE3 A 4 4 teacher health
## 91 GP F 16 U GT3 T 3 3 other other
## 92 GP F 15 U GT3 T 4 3 services other
## 93 GP F 16 U LE3 T 3 1 other other
## 94 GP F 16 U GT3 T 4 2 teacher services
## 95 GP M 15 U LE3 T 2 2 services health
## 96 GP F 15 R GT3 T 1 1 at_home other
## 97 GP M 16 R GT3 T 4 3 services other
## 98 GP F 16 U GT3 T 2 1 other other
## 99 GP F 16 U GT3 T 4 4 other other
## 100 GP F 16 U GT3 T 4 3 other at_home
## 101 GP M 16 U GT3 T 4 4 services services
## 102 GP M 16 U GT3 T 4 4 services teacher
## 103 GP M 15 U GT3 T 4 4 services other
## 104 GP F 15 U GT3 T 3 2 services other
## 105 GP M 15 U GT3 A 3 4 services other
## 106 GP F 15 U GT3 A 3 3 other health
## 107 GP F 15 U GT3 T 2 2 other other
## 108 GP M 16 U GT3 T 3 3 services other
## 109 GP M 15 R GT3 T 4 4 other other
## 110 GP F 16 U LE3 T 4 4 health health
## 111 GP M 15 U LE3 A 4 4 teacher teacher
## 112 GP F 16 R GT3 T 3 3 services other
## 113 GP F 16 U GT3 T 2 2 at_home other
## 114 GP M 15 U LE3 T 4 2 teacher other
## 115 GP M 15 R GT3 T 2 1 health services
## 116 GP M 16 U GT3 T 4 4 teacher teacher
## 117 GP M 15 U GT3 T 4 4 other teacher
## 118 GP M 16 U GT3 T 3 3 other services
## 119 GP M 17 R GT3 T 1 3 other other
## 120 GP M 15 U GT3 T 3 4 other other
## 121 GP F 15 U GT3 T 1 2 at_home services
## 122 GP M 15 U GT3 T 2 2 services services
## 123 GP F 16 U LE3 T 2 4 other health
## 124 GP M 16 U GT3 T 4 4 health other
## 125 GP F 16 U GT3 T 2 2 other other
## 126 GP M 15 U GT3 T 3 4 services services
## 127 GP F 15 U LE3 A 3 4 other other
## 128 GP F 19 U GT3 T 0 1 at_home other
## 129 GP M 18 R GT3 T 2 2 services other
## 130 GP M 16 R GT3 T 4 4 teacher teacher
## 131 GP F 15 R GT3 T 3 4 services teacher
## 132 GP F 15 U GT3 T 1 1 at_home other
## 133 GP F 17 U LE3 T 2 2 other other
## 134 GP F 16 U GT3 A 3 4 services other
## 135 GP M 15 R GT3 T 3 4 at_home teacher
## 136 GP F 15 U GT3 T 4 4 services at_home
## 137 GP M 17 R GT3 T 3 4 at_home other
## 138 GP F 16 U GT3 A 3 3 other other
## 139 GP M 16 U LE3 T 1 1 services other
## 140 GP F 15 U GT3 T 4 4 teacher teacher
## 141 GP M 15 U GT3 T 4 3 teacher services
## 142 GP M 16 U LE3 T 2 2 services services
## 143 GP F 15 U GT3 T 4 4 teacher services
## 144 GP F 16 U LE3 T 1 1 at_home at_home
## 145 GP M 17 U GT3 T 2 1 other other
## 146 GP F 15 U GT3 T 1 1 other services
## 147 GP F 15 U GT3 T 3 2 health services
## 148 GP F 15 U GT3 T 1 2 at_home other
## 149 GP M 16 U GT3 T 4 4 teacher teacher
## 150 GP M 15 U LE3 A 2 1 services other
## 151 GP M 18 U LE3 T 1 1 other other
## 152 GP M 16 U LE3 T 2 1 at_home other
## 153 GP F 15 R GT3 T 3 3 services services
## 154 GP M 19 U GT3 T 3 2 services at_home
## 155 GP F 17 U GT3 T 4 4 other teacher
## 156 GP M 15 R GT3 T 2 3 at_home services
## 157 GP M 17 R LE3 T 1 2 other other
## 158 GP F 18 R GT3 T 1 1 at_home other
## 159 GP M 16 R GT3 T 2 2 at_home other
## 160 GP M 16 U GT3 T 3 3 other services
## 161 GP M 17 R LE3 T 2 1 at_home other
## 162 GP M 15 R GT3 T 3 2 other other
## 163 GP M 16 U LE3 T 1 2 other other
## 164 GP M 17 U GT3 T 1 3 at_home services
## 165 GP M 17 R LE3 T 1 1 other services
## 166 GP M 16 U GT3 T 3 2 services services
## 167 GP M 16 U GT3 T 2 2 other other
## 168 GP F 16 U GT3 T 4 2 health services
## 169 GP F 16 U GT3 T 2 2 other other
## 170 GP F 16 U GT3 T 4 4 health health
## 171 GP M 16 U GT3 T 3 4 other other
## 172 GP M 16 U GT3 T 1 0 other other
## 173 GP M 17 U LE3 T 4 4 teacher other
## 174 GP F 16 U GT3 T 1 3 at_home services
## 175 GP F 16 U LE3 T 3 3 other other
## 176 GP M 17 U LE3 T 4 3 teacher other
## 177 GP F 16 U GT3 T 2 2 services other
## 178 GP M 17 U GT3 T 3 3 other other
## 179 GP M 16 R GT3 T 4 2 teacher services
## 180 GP M 17 U GT3 T 4 3 other other
## 181 GP M 16 U GT3 T 4 3 teacher other
## 182 GP M 16 U GT3 T 3 3 services other
## 183 GP F 17 U GT3 T 2 4 services services
## 184 GP F 17 U LE3 T 3 3 other other
## 185 GP F 16 U GT3 T 3 2 other other
## 186 GP M 17 U GT3 T 3 3 services services
## 187 GP M 16 U GT3 T 1 2 services services
## 188 GP M 16 U LE3 T 2 1 other other
## 189 GP F 17 U GT3 A 3 3 health other
## 190 GP M 17 R GT3 T 1 2 at_home other
## 191 GP F 16 U GT3 T 2 3 services services
## 192 GP F 17 U GT3 T 1 1 at_home services
## 193 GP M 17 U GT3 T 1 2 at_home services
## 194 GP M 16 R GT3 T 3 3 services services
## 195 GP M 16 U GT3 T 2 3 other other
## 196 GP F 17 U LE3 T 2 4 services services
## 197 GP M 17 U GT3 T 4 4 services teacher
## 198 GP M 16 R LE3 T 3 3 teacher other
## 199 GP F 17 U GT3 T 4 4 services teacher
## 200 GP F 16 U LE3 T 4 4 teacher teacher
## 201 GP F 16 U GT3 T 4 3 health other
## 202 GP F 16 U GT3 T 2 3 other other
## 203 GP F 17 U GT3 T 1 1 other other
## 204 GP F 17 R GT3 T 2 2 other other
## 205 GP F 16 R GT3 T 2 2 services services
## 206 GP F 17 U GT3 T 3 4 at_home services
## 207 GP F 16 U GT3 A 3 1 services other
## 208 GP F 16 U GT3 T 4 3 teacher other
## 209 GP F 16 U GT3 T 1 1 at_home other
## 210 GP F 17 R GT3 T 4 3 teacher other
## 211 GP F 19 U GT3 T 3 3 other other
## 212 GP M 17 U LE3 T 4 4 services other
## 213 GP F 16 U GT3 A 2 2 other other
## 214 GP M 18 U GT3 T 2 2 services other
## 215 GP F 17 R LE3 T 4 4 services other
## 216 GP F 17 U LE3 T 3 2 other other
## 217 GP F 17 U GT3 T 4 3 other other
## 218 GP M 18 U LE3 T 3 3 services health
## 219 GP F 17 U GT3 T 2 3 at_home other
## 220 GP F 17 U GT3 T 2 2 at_home at_home
## 221 GP F 17 R GT3 T 2 1 at_home services
## 222 GP F 17 U GT3 T 1 1 at_home other
## 223 GP F 16 U GT3 T 2 3 services teacher
## 224 GP M 18 U GT3 T 2 2 other other
## 225 GP F 16 U GT3 T 4 4 teacher services
## 226 GP F 18 R GT3 T 3 1 other other
## 227 GP F 17 U GT3 T 3 2 other other
## 228 GP M 17 U LE3 T 2 3 services services
## 229 GP M 18 U LE3 T 2 1 at_home other
## 230 GP F 17 U GT3 A 2 1 other other
## 231 GP F 17 U LE3 T 4 3 health other
## 232 GP M 17 R GT3 T 2 2 other other
## 233 GP M 17 U GT3 T 4 4 teacher teacher
## 234 GP M 16 U GT3 T 4 4 health other
## 235 GP M 16 U LE3 T 1 1 other other
## 236 GP M 16 U GT3 T 3 2 at_home other
## 237 GP M 17 U LE3 T 2 2 other other
## 238 GP F 16 U GT3 T 2 1 other other
## 239 GP F 17 R GT3 T 2 1 at_home services
## 240 GP M 18 U GT3 T 2 2 other services
## 241 GP M 17 U LE3 T 4 3 health other
## 242 GP M 17 R LE3 A 4 4 teacher other
## 243 GP M 16 U LE3 T 4 3 teacher other
## 244 GP M 16 U GT3 T 4 4 services services
## 245 GP F 18 U GT3 T 2 1 other other
## 246 GP M 16 U GT3 T 2 1 other other
## 247 GP M 17 U GT3 T 2 3 other other
## 248 GP M 22 U GT3 T 3 1 services services
## 249 GP M 18 R LE3 T 3 3 other services
## 250 GP M 16 U GT3 T 0 2 other other
## 251 GP M 18 U GT3 T 3 2 services other
## 252 GP M 16 U GT3 T 3 3 at_home other
## 253 GP M 18 U GT3 T 2 1 services services
## 254 GP M 16 R GT3 T 2 1 other other
## 255 GP M 17 R GT3 T 2 1 other other
## 256 GP M 17 U LE3 T 1 1 health other
## 257 GP F 17 U LE3 T 4 2 teacher services
## 258 GP M 19 U LE3 A 4 3 services at_home
## 259 GP M 18 U GT3 T 2 1 other other
## 260 GP F 17 U LE3 T 2 2 services services
## 261 GP F 18 U GT3 T 4 3 services other
## 262 GP M 18 U GT3 T 4 3 teacher other
## 263 GP M 18 R GT3 T 3 2 other other
## 264 GP F 17 U GT3 T 3 3 other other
## 265 GP F 18 U GT3 T 2 2 at_home services
## 266 GP M 18 R LE3 A 3 4 other other
## 267 GP M 17 U GT3 T 3 1 services other
## 268 GP F 18 R GT3 T 4 4 teacher other
## 269 GP M 18 U GT3 T 4 2 health other
## 270 GP F 18 R GT3 T 2 1 other other
## 271 GP F 19 U GT3 T 3 3 other services
## 272 GP F 18 U GT3 T 2 3 other services
## 273 GP F 18 U LE3 T 1 1 other other
## 274 GP M 17 R GT3 T 1 2 at_home at_home
## 275 GP F 17 U GT3 T 2 4 at_home health
## 276 GP F 17 U LE3 T 2 2 services other
## 277 GP F 18 R GT3 A 3 2 other services
## 278 GP M 18 U GT3 T 4 4 teacher services
## 279 GP F 18 U GT3 T 4 4 health health
## 280 GP M 18 U LE3 T 4 3 teacher services
## 281 GP M 17 U LE3 A 4 1 services other
## 282 GP M 17 U LE3 A 3 2 teacher services
## 283 GP F 18 R LE3 T 1 1 at_home other
## 284 GP F 18 U GT3 T 1 1 other other
## 285 GP F 17 U GT3 T 2 2 other other
## 286 GP M 17 U GT3 T 1 1 other other
## 287 GP F 18 U GT3 T 2 2 at_home at_home
## 288 GP F 17 U GT3 T 1 1 services teacher
## 289 GP M 18 U GT3 T 2 1 services services
## 290 GP M 18 U LE3 A 4 4 teacher teacher
## 291 GP M 18 U GT3 T 4 2 teacher other
## 292 GP F 17 U GT3 T 4 3 health services
## 293 GP F 18 U LE3 T 2 1 services at_home
## 294 GP F 17 R LE3 T 3 1 services other
## 295 GP M 18 R LE3 T 3 2 services other
## 296 GP M 17 U GT3 T 3 3 health other
## 297 GP F 19 U GT3 T 4 4 health other
## 298 GP F 18 U LE3 T 4 3 other other
## 299 GP F 18 U GT3 T 4 3 other other
## 300 GP M 18 U LE3 T 4 4 teacher teacher
## 301 GP F 18 U LE3 A 4 4 health other
## 302 GP M 17 U LE3 T 4 4 other teacher
## 303 GP F 17 U GT3 T 4 2 other other
## 304 GP F 17 U GT3 T 3 2 health health
## 305 GP M 19 U GT3 T 3 3 other other
## 306 GP F 18 U GT3 T 2 4 services at_home
## 307 GP M 20 U GT3 A 3 2 services other
## 308 GP M 19 U GT3 T 4 4 teacher services
## 309 GP M 19 R GT3 T 3 3 other services
## 310 GP F 19 U LE3 T 1 1 at_home other
## 311 GP F 19 U LE3 T 1 2 services services
## 312 GP F 19 U GT3 T 2 1 at_home other
## 313 GP M 19 U GT3 T 1 2 other services
## 314 GP F 19 U LE3 T 3 2 services other
## 315 GP F 19 U GT3 T 1 1 at_home health
## 316 GP F 19 R GT3 T 2 3 other other
## 317 GP F 18 U GT3 T 2 1 services other
## 318 GP F 18 U GT3 T 4 3 other other
## 319 GP F 17 R GT3 T 3 4 at_home services
## 320 GP F 18 U GT3 T 4 4 teacher other
## 321 GP F 17 U GT3 A 4 3 services services
## 322 GP F 17 U GT3 T 2 2 other other
## 323 GP F 17 R LE3 T 2 2 services services
## 324 GP F 17 U GT3 T 3 1 services services
## 325 GP F 17 U LE3 T 0 2 at_home at_home
## 326 GP M 18 U GT3 T 4 4 other other
## 327 GP M 17 U GT3 T 3 3 other services
## 328 GP M 17 R GT3 T 2 2 services other
## 329 GP F 17 U GT3 T 4 4 teacher services
## 330 GP F 17 U GT3 T 4 4 teacher teacher
## 331 GP M 18 U LE3 T 2 2 other other
## 332 GP F 17 R GT3 T 2 4 at_home other
## 333 GP F 18 U GT3 T 3 3 services services
## 334 GP F 18 U LE3 T 2 2 other other
## 335 GP F 18 R GT3 T 2 2 at_home other
## 336 GP F 17 U GT3 T 3 4 services other
## 337 GP F 19 R GT3 A 3 1 services at_home
## 338 GP F 17 U GT3 T 3 2 other other
## 339 GP F 18 U LE3 T 3 3 services services
## 340 GP F 17 R GT3 A 3 2 other other
## 341 GP F 19 U GT3 T 2 1 services services
## 342 GP M 18 U GT3 T 4 4 teacher services
## 343 GP M 18 U LE3 T 3 4 services other
## 344 GP F 17 U GT3 A 2 2 at_home at_home
## 345 GP F 18 U GT3 T 2 3 at_home other
## 346 GP F 18 U GT3 T 3 2 other services
## 347 GP M 18 R GT3 T 4 3 teacher services
## 348 GP M 18 U GT3 T 4 3 teacher other
## 349 GP F 17 U GT3 T 4 3 health other
## 350 MS M 18 R GT3 T 3 2 other other
## 351 MS M 19 R GT3 T 1 1 other services
## 352 MS M 17 U GT3 T 3 3 health other
## 353 MS M 18 U LE3 T 1 3 at_home services
## 354 MS M 19 R GT3 T 1 1 other other
## 355 MS M 17 R GT3 T 4 3 services other
## 356 MS F 18 U GT3 T 3 3 services services
## 357 MS F 17 R GT3 T 4 4 teacher services
## 358 MS F 17 U LE3 A 3 2 services other
## 359 MS M 18 U LE3 T 1 1 other services
## 360 MS F 18 U LE3 T 1 1 at_home services
## 361 MS F 18 R LE3 A 1 4 at_home other
## 362 MS M 18 R LE3 T 1 1 at_home other
## 363 MS F 18 U GT3 T 3 3 services services
## 364 MS F 17 U LE3 T 4 4 at_home at_home
## 365 MS F 17 R GT3 T 1 2 other services
## 366 MS M 18 R GT3 T 1 3 at_home other
## 367 MS M 18 U LE3 T 4 4 teacher services
## 368 MS F 17 R GT3 T 1 1 other services
## 369 MS F 18 U GT3 T 2 3 at_home services
## 370 MS F 18 R GT3 T 4 4 other teacher
## 371 MS F 19 U LE3 T 3 2 services services
## 372 MS M 18 R LE3 T 1 2 at_home services
## 373 MS F 17 U GT3 T 2 2 other at_home
## 374 MS F 17 R GT3 T 1 2 other other
## 375 MS F 18 R LE3 T 4 4 other other
## 376 MS F 18 R GT3 T 1 1 other other
## 377 MS F 20 U GT3 T 4 2 health other
## 378 MS F 18 R LE3 T 4 4 teacher services
## 379 MS F 18 U GT3 T 3 3 other other
## 380 MS F 17 R GT3 T 3 1 at_home other
## 381 MS M 18 U GT3 T 4 4 teacher teacher
## 382 MS M 18 R GT3 T 2 1 other other
## 383 MS M 17 U GT3 T 2 3 other services
## 384 MS M 19 R GT3 T 1 1 other services
## 385 MS M 18 R GT3 T 4 2 other other
## 386 MS F 18 R GT3 T 2 2 at_home other
## 387 MS F 18 R GT3 T 4 4 teacher at_home
## 388 MS F 19 R GT3 T 2 3 services other
## 389 MS F 18 U LE3 T 3 1 teacher services
## 390 MS F 18 U GT3 T 1 1 other other
## 391 MS M 20 U LE3 A 2 2 services services
## 392 MS M 17 U LE3 T 3 1 services services
## 393 MS M 21 R GT3 T 1 1 other other
## 394 MS M 18 R LE3 T 3 2 services other
## 395 MS M 19 U LE3 T 1 1 other at_home
## reason guardian traveltime studytime failures schoolsup famsup paid
## 1 course mother 2 2 0 yes no no
## 2 course father 1 2 0 no yes no
## 3 other mother 1 2 3 yes no yes
## 4 home mother 1 3 0 no yes yes
## 5 home father 1 2 0 no yes yes
## 6 reputation mother 1 2 0 no yes yes
## 7 home mother 1 2 0 no no no
## 8 home mother 2 2 0 yes yes no
## 9 home mother 1 2 0 no yes yes
## 10 home mother 1 2 0 no yes yes
## 11 reputation mother 1 2 0 no yes yes
## 12 reputation father 3 3 0 no yes no
## 13 course father 1 1 0 no yes yes
## 14 course mother 2 2 0 no yes yes
## 15 home other 1 3 0 no yes no
## 16 home mother 1 1 0 no yes no
## 17 reputation mother 1 3 0 no yes yes
## 18 reputation mother 3 2 0 yes yes no
## 19 course mother 1 1 3 no yes no
## 20 home father 1 1 0 no no yes
## 21 reputation mother 1 2 0 no no no
## 22 other father 1 1 0 no yes yes
## 23 course mother 1 2 0 no no no
## 24 reputation mother 2 2 0 no yes no
## 25 course mother 1 3 0 yes yes yes
## 26 home mother 1 1 2 no yes yes
## 27 home mother 1 1 0 no yes yes
## 28 other mother 1 1 0 no no yes
## 29 home mother 1 2 0 yes yes no
## 30 home mother 1 2 0 no yes yes
## 31 home mother 1 2 0 no yes yes
## 32 reputation mother 2 2 0 no yes no
## 33 course mother 1 2 0 no yes no
## 34 course mother 1 2 0 no no no
## 35 home mother 1 1 0 no yes yes
## 36 other father 2 1 0 no yes no
## 37 home mother 1 3 0 no yes no
## 38 reputation mother 2 3 0 no yes no
## 39 course mother 1 3 0 yes yes yes
## 40 reputation mother 1 1 0 yes yes yes
## 41 home mother 2 2 1 no yes no
## 42 home other 1 1 0 no yes no
## 43 course father 1 2 0 no yes no
## 44 course father 1 1 0 yes yes no
## 45 course father 2 2 1 yes no no
## 46 course mother 1 2 0 yes yes yes
## 47 home mother 1 2 0 no yes no
## 48 reputation mother 1 4 0 no no no
## 49 home mother 1 2 0 no yes yes
## 50 other father 1 2 1 yes yes no
## 51 course mother 3 2 0 no yes yes
## 52 other mother 1 2 0 no yes yes
## 53 other father 2 1 1 no no no
## 54 course mother 1 1 0 yes yes yes
## 55 other mother 1 1 0 no no yes
## 56 other mother 1 2 0 no no yes
## 57 reputation mother 1 2 0 no yes yes
## 58 reputation mother 1 2 0 no yes no
## 59 home father 1 2 0 yes yes no
## 60 course mother 1 2 0 no yes no
## 61 other mother 1 2 0 no yes no
## 62 course father 4 1 0 yes yes no
## 63 reputation father 1 2 0 yes no no
## 64 home mother 1 3 0 yes yes yes
## 65 reputation father 1 2 0 yes no no
## 66 course mother 3 2 0 no yes no
## 67 reputation mother 1 4 0 no yes no
## 68 course mother 1 4 0 yes yes yes
## 69 reputation mother 2 2 0 yes yes yes
## 70 reputation father 2 4 0 no yes no
## 71 reputation father 2 4 0 no yes yes
## 72 course mother 1 4 0 no no no
## 73 reputation mother 1 2 2 yes yes no
## 74 reputation mother 1 1 0 no no no
## 75 home mother 1 2 0 yes yes yes
## 76 home mother 1 2 0 no yes yes
## 77 course mother 2 4 0 no no no
## 78 reputation mother 1 4 0 no no yes
## 79 home mother 2 1 3 yes yes no
## 80 course mother 1 2 0 no yes no
## 81 course father 1 1 0 yes yes yes
## 82 home mother 1 3 0 yes no yes
## 83 reputation mother 1 2 0 no yes yes
## 84 home mother 2 2 0 no no yes
## 85 home father 1 2 0 no yes no
## 86 reputation father 2 2 2 no no yes
## 87 course mother 1 2 0 no yes no
## 88 reputation mother 1 3 0 no yes no
## 89 reputation father 2 2 1 no no yes
## 90 reputation mother 1 2 0 no yes no
## 91 home mother 1 3 0 no yes yes
## 92 reputation mother 1 1 0 no no yes
## 93 home father 1 2 0 yes yes no
## 94 home mother 2 2 0 no yes yes
## 95 reputation mother 1 4 0 no yes no
## 96 home mother 2 4 1 yes yes yes
## 97 reputation mother 2 1 0 yes yes no
## 98 course mother 1 2 0 no yes yes
## 99 reputation mother 1 1 0 no no no
## 100 course mother 1 3 0 yes yes yes
## 101 other mother 1 1 0 yes yes yes
## 102 other father 1 3 0 no yes no
## 103 course mother 1 1 0 no yes no
## 104 home mother 2 2 0 yes yes yes
## 105 course mother 1 2 0 no yes yes
## 106 reputation father 1 4 0 yes no no
## 107 course mother 1 4 0 yes yes yes
## 108 home father 1 3 0 no yes no
## 109 home father 4 4 0 no yes yes
## 110 other mother 1 3 0 no yes yes
## 111 course mother 1 1 0 no no no
## 112 reputation father 1 3 1 yes yes no
## 113 home mother 1 2 1 yes no no
## 114 course mother 1 1 0 no no no
## 115 reputation mother 1 2 0 no no no
## 116 course father 1 2 0 no yes no
## 117 reputation father 2 2 0 no yes no
## 118 home father 2 1 0 no no no
## 119 course father 3 2 1 no yes no
## 120 reputation father 1 1 0 no no no
## 121 course mother 1 2 0 no no no
## 122 home father 1 4 0 no yes yes
## 123 course father 2 2 0 no yes yes
## 124 course mother 1 1 0 no yes no
## 125 home mother 1 2 0 no no yes
## 126 home father 1 1 0 yes no no
## 127 home mother 1 2 0 yes no no
## 128 course other 1 2 3 no yes no
## 129 reputation mother 1 1 2 no yes no
## 130 course mother 1 1 0 no no yes
## 131 course father 2 3 2 no yes no
## 132 course mother 3 1 0 no yes no
## 133 course father 1 1 0 no yes no
## 134 course father 1 1 0 no no no
## 135 course mother 4 2 0 no yes no
## 136 course mother 1 3 0 no yes no
## 137 course mother 3 2 0 no no no
## 138 course other 2 1 2 no yes no
## 139 course mother 1 2 1 no no no
## 140 course mother 2 1 0 no no no
## 141 course father 2 4 0 yes yes no
## 142 reputation father 2 1 2 no yes no
## 143 course mother 1 3 0 no yes yes
## 144 course mother 1 1 0 no no no
## 145 home mother 1 1 3 no yes no
## 146 course father 1 2 0 no yes yes
## 147 home father 1 2 3 no yes no
## 148 course mother 1 2 0 no yes yes
## 149 course mother 1 1 0 no yes no
## 150 course mother 4 1 3 no no no
## 151 course mother 1 1 3 no no no
## 152 course mother 1 1 1 no no no
## 153 reputation other 2 3 2 no yes yes
## 154 home mother 1 1 3 no yes no
## 155 course mother 1 1 0 yes yes no
## 156 course mother 1 2 0 yes no yes
## 157 reputation mother 1 1 0 no no no
## 158 course mother 3 1 3 no yes no
## 159 course mother 3 1 0 no no no
## 160 course father 1 2 1 no yes yes
## 161 course mother 2 1 2 no no no
## 162 course mother 2 2 2 yes yes no
## 163 course mother 2 1 1 no no no
## 164 course father 1 1 0 no no no
## 165 course mother 4 2 3 no no no
## 166 course mother 2 1 1 no yes no
## 167 course father 1 2 0 no no no
## 168 home father 1 2 0 no no yes
## 169 home mother 1 2 0 no yes yes
## 170 reputation mother 1 2 0 no yes yes
## 171 course father 3 1 2 no yes no
## 172 reputation mother 2 2 0 no yes yes
## 173 reputation mother 1 2 0 no yes yes
## 174 home mother 1 2 3 no no no
## 175 reputation mother 2 2 0 no yes yes
## 176 course mother 2 2 0 no no yes
## 177 reputation mother 2 2 0 no no yes
## 178 reputation father 1 2 0 no no no
## 179 other mother 1 1 0 no yes no
## 180 course mother 1 2 0 no yes no
## 181 home mother 1 2 0 no yes yes
## 182 home mother 1 2 0 no no yes
## 183 reputation father 1 2 0 no yes no
## 184 reputation mother 1 2 0 no yes no
## 185 reputation mother 1 2 0 no yes yes
## 186 other mother 1 2 0 no yes no
## 187 other mother 1 1 0 no yes yes
## 188 course mother 1 2 0 no no yes
## 189 reputation mother 1 2 0 no yes no
## 190 home mother 1 2 0 no no no
## 191 course mother 1 2 0 no no no
## 192 course mother 1 2 0 no no no
## 193 other other 2 2 0 no no yes
## 194 reputation mother 1 1 0 no yes no
## 195 home father 2 1 0 no no no
## 196 course father 1 2 0 no no no
## 197 home mother 1 1 0 no no no
## 198 home father 3 1 0 no yes yes
## 199 home mother 2 1 1 no yes no
## 200 reputation mother 1 2 0 no yes yes
## 201 home mother 1 2 0 no yes no
## 202 reputation mother 1 2 0 yes yes yes
## 203 course mother 1 2 0 no yes yes
## 204 reputation mother 1 1 0 no yes no
## 205 reputation mother 2 4 0 no yes yes
## 206 home mother 1 3 1 no yes yes
## 207 course mother 1 2 3 no yes yes
## 208 other mother 1 2 0 no no yes
## 209 home mother 2 1 0 no yes yes
## 210 reputation mother 2 3 0 no yes yes
## 211 reputation other 1 4 0 no yes yes
## 212 home mother 1 2 0 no yes yes
## 213 reputation mother 1 2 0 yes yes yes
## 214 home mother 1 2 1 no yes yes
## 215 other mother 1 1 0 no yes yes
## 216 reputation mother 2 2 0 no no yes
## 217 reputation mother 1 2 2 no no yes
## 218 home father 1 2 1 no yes yes
## 219 home father 2 1 0 no yes yes
## 220 course mother 1 3 0 no yes yes
## 221 reputation mother 2 2 0 no yes no
## 222 reputation mother 1 3 1 no yes no
## 223 other mother 1 2 0 yes no no
## 224 home mother 2 2 0 no yes yes
## 225 home mother 1 3 0 no yes no
## 226 reputation mother 1 2 1 no no no
## 227 course mother 1 2 0 no no no
## 228 reputation father 1 2 0 no yes yes
## 229 course mother 4 2 0 yes yes yes
## 230 course mother 2 3 0 no no no
## 231 reputation father 1 2 0 no no no
## 232 course father 2 2 0 no yes yes
## 233 reputation mother 1 2 0 yes yes no
## 234 reputation father 1 2 0 no yes yes
## 235 home mother 2 2 0 no yes yes
## 236 reputation mother 2 3 0 no no no
## 237 home father 1 2 0 no no yes
## 238 home mother 1 1 0 no no no
## 239 course mother 3 2 0 no no no
## 240 reputation father 1 2 1 no no no
## 241 course mother 2 2 0 no no no
## 242 course mother 2 2 0 no yes yes
## 243 course mother 1 1 0 no no no
## 244 course mother 1 1 0 no no no
## 245 course other 2 3 0 no yes yes
## 246 course mother 3 1 0 no no no
## 247 course father 2 1 0 no no no
## 248 other mother 1 1 3 no no no
## 249 course mother 1 2 1 no yes no
## 250 other mother 1 1 0 no no yes
## 251 course mother 2 1 1 no no no
## 252 reputation other 3 2 0 yes yes no
## 253 other mother 1 1 1 no no no
## 254 course mother 2 1 0 no no no
## 255 course mother 1 1 0 no no no
## 256 course mother 2 1 1 no yes no
## 257 reputation mother 1 4 0 no yes yes
## 258 reputation mother 1 2 0 no yes no
## 259 home mother 1 2 0 no no no
## 260 course father 1 4 0 no no yes
## 261 home father 1 2 0 no yes yes
## 262 course mother 1 2 0 no yes yes
## 263 course mother 1 3 0 no no no
## 264 home mother 1 3 0 no no no
## 265 home mother 1 3 0 no yes yes
## 266 reputation mother 2 2 0 no yes yes
## 267 other mother 1 2 0 no no yes
## 268 reputation mother 2 2 0 no no yes
## 269 reputation father 1 2 0 no yes yes
## 270 reputation mother 2 2 0 no yes no
## 271 home other 1 2 2 no yes yes
## 272 reputation father 1 4 0 no yes yes
## 273 home mother 2 2 0 no yes yes
## 274 home mother 1 2 0 no yes yes
## 275 reputation mother 2 2 0 no yes yes
## 276 course mother 2 2 0 yes yes yes
## 277 home mother 2 2 0 no no no
## 278 home mother 2 1 0 no no yes
## 279 reputation father 1 2 1 yes yes no
## 280 course mother 2 1 0 no no yes
## 281 home mother 2 1 0 no no yes
## 282 home mother 1 1 1 no no no
## 283 reputation mother 2 4 0 no yes yes
## 284 home mother 2 2 0 yes no no
## 285 course mother 1 2 0 no yes no
## 286 reputation father 1 2 0 no no yes
## 287 other mother 1 3 0 no yes yes
## 288 reputation mother 1 3 0 no yes yes
## 289 reputation mother 1 3 0 no no yes
## 290 reputation mother 1 2 0 no yes yes
## 291 home mother 1 2 0 no yes yes
## 292 reputation mother 1 3 0 no yes yes
## 293 reputation mother 1 2 1 no no no
## 294 reputation mother 2 4 0 no yes yes
## 295 reputation mother 2 3 0 no yes yes
## 296 home mother 1 1 0 no yes yes
## 297 reputation other 2 2 0 no yes yes
## 298 home other 2 2 0 no yes yes
## 299 reputation father 1 4 0 no yes yes
## 300 home mother 1 1 0 no yes yes
## 301 home mother 1 2 0 no yes no
## 302 home father 2 1 0 no no yes
## 303 reputation mother 2 3 0 no yes yes
## 304 reputation father 1 4 0 no yes yes
## 305 home other 1 2 1 no yes no
## 306 reputation other 1 2 1 no yes yes
## 307 course other 1 1 0 no no no
## 308 reputation other 2 1 1 no yes yes
## 309 reputation father 1 2 1 no no no
## 310 reputation other 1 2 1 yes yes no
## 311 home other 1 2 1 no no no
## 312 other other 3 2 0 no yes no
## 313 course other 1 2 1 no no no
## 314 reputation other 2 2 1 no yes yes
## 315 home other 1 3 2 no no no
## 316 reputation other 1 3 1 no no no
## 317 course mother 2 2 0 no yes yes
## 318 course mother 1 3 0 no yes yes
## 319 course father 1 3 0 no yes yes
## 320 course mother 1 2 0 no yes yes
## 321 course mother 1 2 0 no yes yes
## 322 course mother 1 2 0 no yes no
## 323 course mother 1 3 0 no yes yes
## 324 course father 1 3 0 no yes no
## 325 home father 2 3 0 no no no
## 326 course mother 1 3 0 no no no
## 327 reputation mother 1 1 0 no no no
## 328 course mother 4 1 0 no yes no
## 329 course mother 1 3 0 no yes yes
## 330 course mother 2 3 0 no yes yes
## 331 course mother 1 4 0 no yes no
## 332 course father 1 3 0 no yes no
## 333 home mother 1 2 0 no no no
## 334 home other 1 2 0 no no no
## 335 course mother 2 4 0 no no no
## 336 course mother 1 3 0 no no no
## 337 home other 1 3 1 no no yes
## 338 home mother 1 2 0 no yes yes
## 339 home mother 1 4 0 no yes no
## 340 home mother 1 2 0 no yes yes
## 341 home other 1 3 1 no no yes
## 342 home father 1 2 1 no yes no
## 343 home mother 1 2 0 no no no
## 344 home father 1 2 1 no yes no
## 345 course mother 1 3 0 no yes no
## 346 other mother 1 3 0 no no no
## 347 course mother 1 3 0 no no no
## 348 course mother 1 3 0 no yes yes
## 349 reputation mother 1 3 0 no yes yes
## 350 course mother 2 1 1 no yes no
## 351 home other 3 2 3 no no no
## 352 course mother 2 2 0 no yes yes
## 353 course mother 1 1 1 no no no
## 354 home other 3 1 1 no yes no
## 355 home mother 2 2 0 no yes yes
## 356 course father 1 2 0 no yes no
## 357 other father 2 2 0 no yes yes
## 358 reputation mother 2 2 0 no no no
## 359 home father 2 1 0 no no no
## 360 course father 2 3 0 no no no
## 361 course mother 3 2 0 no no no
## 362 other mother 2 2 1 no no no
## 363 other mother 2 2 0 no yes no
## 364 course mother 1 2 0 no yes yes
## 365 course father 2 2 0 no no no
## 366 course mother 2 2 0 no yes yes
## 367 other mother 2 3 0 no no yes
## 368 reputation mother 3 1 1 no yes yes
## 369 course father 2 1 0 no yes yes
## 370 other father 3 2 0 no yes yes
## 371 home other 2 2 2 no no no
## 372 other father 3 1 0 no yes yes
## 373 home mother 1 3 0 no no no
## 374 course mother 1 1 0 no no no
## 375 reputation mother 2 3 0 no no no
## 376 home mother 4 3 0 no no no
## 377 course other 2 3 2 no yes yes
## 378 course mother 1 2 0 no no yes
## 379 home mother 1 2 0 no no yes
## 380 reputation mother 1 2 0 no yes yes
## 381 home father 1 2 0 no no yes
## 382 other mother 2 1 0 no no no
## 383 home father 2 2 0 no no no
## 384 other mother 2 1 1 no no no
## 385 home father 2 1 1 no no yes
## 386 other mother 2 3 0 no no yes
## 387 reputation mother 3 1 0 no yes yes
## 388 course mother 1 3 1 no no no
## 389 course mother 1 2 0 no yes yes
## 390 course mother 2 2 1 no no no
## 391 course other 1 2 2 no yes yes
## 392 course mother 2 1 0 no no no
## 393 course other 1 1 3 no no no
## 394 course mother 3 1 0 no no no
## 395 course father 1 1 0 no no no
## activities nursery higher internet romantic famrel freetime goout Dalc Walc
## 1 no yes yes no no 4 3 4 1 1
## 2 no no yes yes no 5 3 3 1 1
## 3 no yes yes yes no 4 3 2 2 3
## 4 yes yes yes yes yes 3 2 2 1 1
## 5 no yes yes no no 4 3 2 1 2
## 6 yes yes yes yes no 5 4 2 1 2
## 7 no yes yes yes no 4 4 4 1 1
## 8 no yes yes no no 4 1 4 1 1
## 9 no yes yes yes no 4 2 2 1 1
## 10 yes yes yes yes no 5 5 1 1 1
## 11 no yes yes yes no 3 3 3 1 2
## 12 yes yes yes yes no 5 2 2 1 1
## 13 yes yes yes yes no 4 3 3 1 3
## 14 no yes yes yes no 5 4 3 1 2
## 15 no yes yes yes yes 4 5 2 1 1
## 16 no yes yes yes no 4 4 4 1 2
## 17 yes yes yes yes no 3 2 3 1 2
## 18 yes yes yes no no 5 3 2 1 1
## 19 yes yes yes yes no 5 5 5 2 4
## 20 yes yes yes yes no 3 1 3 1 3
## 21 no yes yes yes no 4 4 1 1 1
## 22 no yes yes yes no 5 4 2 1 1
## 23 yes yes yes yes no 4 5 1 1 3
## 24 yes yes yes yes no 5 4 4 2 4
## 25 yes yes yes yes no 4 3 2 1 1
## 26 no no yes yes no 1 2 2 1 3
## 27 no yes yes yes no 4 2 2 1 2
## 28 no yes yes yes no 2 2 4 2 4
## 29 yes yes yes yes no 5 3 3 1 1
## 30 yes yes yes yes yes 4 4 5 5 5
## 31 no no yes yes no 5 4 2 3 4
## 32 yes yes yes yes no 4 3 1 1 1
## 33 yes yes yes yes yes 4 5 2 1 1
## 34 yes no yes yes no 5 3 2 1 1
## 35 no no yes yes no 5 4 3 1 1
## 36 yes yes yes no no 3 5 1 1 1
## 37 yes yes yes yes no 5 4 3 1 1
## 38 yes yes yes yes yes 2 4 3 1 1
## 39 yes yes yes yes no 4 3 2 1 1
## 40 yes yes yes no no 4 3 1 1 1
## 41 yes no yes yes yes 3 3 3 1 2
## 42 no no yes yes yes 5 4 3 2 4
## 43 yes yes yes yes no 4 3 3 1 1
## 44 no yes yes yes no 5 4 1 1 1
## 45 yes yes yes yes no 4 3 3 2 2
## 46 yes yes yes yes yes 5 2 2 1 1
## 47 no yes yes yes no 2 3 5 1 4
## 48 yes yes yes yes no 4 2 2 1 1
## 49 no yes yes no no 4 3 3 2 2
## 50 yes no yes yes no 4 4 4 1 1
## 51 no yes yes yes no 4 3 3 2 3
## 52 no yes yes yes no 4 3 3 1 1
## 53 no yes yes no no 5 5 5 3 4
## 54 no yes yes yes no 3 3 4 2 3
## 55 no yes yes yes no 5 3 4 4 4
## 56 yes yes yes yes yes 5 3 4 1 1
## 57 yes yes yes yes no 4 3 2 1 1
## 58 yes yes yes no no 3 2 2 1 1
## 59 yes yes yes yes no 4 3 2 1 1
## 60 no yes yes yes no 4 2 3 1 1
## 61 yes yes yes no no 2 4 4 2 3
## 62 yes no yes yes yes 5 5 5 5 5
## 63 yes yes yes yes no 4 4 3 1 1
## 64 yes yes yes yes no 3 4 4 2 4
## 65 yes yes yes yes yes 4 4 4 2 4
## 66 yes yes yes yes no 5 4 3 1 2
## 67 yes no yes yes yes 1 3 3 5 5
## 68 no yes yes yes no 4 3 3 1 2
## 69 no yes yes yes no 4 1 3 1 3
## 70 no no yes yes no 4 4 2 2 3
## 71 no yes yes yes no 4 3 2 1 1
## 72 no yes yes yes no 3 3 3 1 1
## 73 no no yes yes yes 3 3 4 2 4
## 74 yes yes yes no no 5 3 2 2 2
## 75 yes yes yes yes no 4 3 3 2 4
## 76 yes yes yes yes no 4 3 3 2 3
## 77 yes yes yes yes no 3 4 3 1 1
## 78 no yes yes yes yes 5 2 3 1 3
## 79 yes yes no yes no 4 5 1 1 1
## 80 no yes yes yes no 2 4 3 1 2
## 81 yes no yes yes yes 3 2 2 1 3
## 82 no no yes yes no 5 3 2 1 2
## 83 no yes yes yes no 4 4 4 1 1
## 84 yes yes yes yes no 5 3 3 1 3
## 85 yes no yes yes no 4 3 2 2 3
## 86 no yes yes yes yes 4 4 4 2 3
## 87 no yes yes no no 4 3 4 1 2
## 88 yes yes yes yes no 5 3 3 1 3
## 89 yes no yes yes no 4 4 2 1 1
## 90 no yes yes no no 4 1 3 3 5
## 91 no yes yes yes yes 4 3 3 1 3
## 92 yes yes yes yes no 4 5 5 1 3
## 93 no yes yes no no 3 3 3 2 3
## 94 yes yes yes yes no 5 3 3 1 1
## 95 yes yes yes yes no 4 3 4 1 1
## 96 yes yes yes yes no 3 1 2 1 1
## 97 yes no yes yes no 3 3 3 1 1
## 98 no yes yes no yes 4 3 5 1 1
## 99 yes no yes yes no 5 3 4 1 2
## 100 no yes yes yes no 5 3 5 1 1
## 101 yes yes yes yes no 4 5 5 5 5
## 102 yes yes yes yes yes 4 4 3 1 1
## 103 yes no yes yes no 5 3 3 1 1
## 104 no yes yes yes no 4 3 5 1 1
## 105 yes yes yes yes no 5 4 4 1 1
## 106 no yes yes no no 4 3 3 1 1
## 107 no yes yes yes no 5 1 2 1 1
## 108 yes yes yes yes no 5 3 3 1 1
## 109 yes yes yes yes yes 1 3 5 3 5
## 110 yes yes yes yes yes 5 4 5 1 1
## 111 yes yes yes yes no 5 5 3 1 1
## 112 yes yes yes yes no 4 1 2 1 1
## 113 yes yes yes yes no 3 1 2 1 1
## 114 no yes yes yes no 3 5 2 1 1
## 115 yes yes yes yes yes 5 4 2 1 1
## 116 yes yes yes yes no 5 4 4 1 2
## 117 yes yes yes no no 4 4 3 1 1
## 118 yes yes yes yes no 5 4 2 1 1
## 119 yes yes yes yes no 5 2 4 1 4
## 120 no yes yes yes no 3 4 3 1 2
## 121 no no yes yes no 3 2 3 1 2
## 122 yes yes yes yes no 5 5 4 1 2
## 123 yes yes yes yes yes 4 2 2 1 2
## 124 yes yes yes yes no 3 4 4 1 4
## 125 no yes yes yes yes 5 4 4 1 1
## 126 no yes yes yes no 5 5 5 3 2
## 127 yes yes yes yes yes 5 3 2 1 1
## 128 no no no no no 3 4 2 1 1
## 129 yes yes yes yes no 3 3 3 1 2
## 130 yes yes yes yes no 3 5 5 2 5
## 131 no yes yes yes yes 4 2 2 2 2
## 132 yes no yes yes yes 4 3 3 1 2
## 133 no yes yes yes yes 3 4 4 1 3
## 134 no yes yes yes no 3 2 1 1 4
## 135 no yes yes no yes 5 3 3 1 1
## 136 yes yes yes yes yes 4 3 3 1 1
## 137 no yes yes no no 5 4 5 2 4
## 138 yes no yes yes yes 4 3 2 1 1
## 139 no yes yes no yes 4 4 4 1 3
## 140 yes yes yes yes no 4 3 2 1 1
## 141 no yes yes yes no 2 2 2 1 1
## 142 yes yes yes yes no 2 3 3 2 2
## 143 yes yes yes yes no 4 2 2 1 1
## 144 no yes yes yes no 3 4 4 3 3
## 145 no yes yes yes no 5 4 5 1 2
## 146 no yes yes yes no 4 4 2 1 2
## 147 no yes yes yes no 3 3 2 1 1
## 148 no no yes yes no 4 3 2 1 1
## 149 no yes no yes yes 3 3 2 2 1
## 150 no yes yes yes no 4 5 5 2 5
## 151 no yes no yes yes 2 3 5 2 5
## 152 yes yes yes no yes 4 4 4 3 5
## 153 yes yes yes yes yes 4 2 1 2 3
## 154 no yes no yes yes 4 5 4 1 1
## 155 no yes yes no yes 4 2 1 1 1
## 156 yes yes yes no no 4 4 4 1 1
## 157 no yes yes no no 2 2 2 3 3
## 158 yes no yes no no 5 2 5 1 5
## 159 no no yes no no 4 2 2 1 2
## 160 no yes yes yes yes 4 5 5 4 4
## 161 yes yes no yes yes 3 3 2 2 2
## 162 no yes yes yes yes 4 4 4 1 4
## 163 yes yes yes no no 4 4 4 2 4
## 164 no yes no yes no 5 3 3 1 4
## 165 yes yes no no yes 5 3 5 1 5
## 166 yes no no no no 4 5 2 1 1
## 167 no yes no yes no 4 3 5 2 4
## 168 no yes yes yes yes 4 2 3 1 1
## 169 no no yes yes no 5 1 5 1 1
## 170 no yes yes yes yes 4 4 2 1 1
## 171 yes no yes yes no 3 4 5 2 4
## 172 yes yes yes yes yes 4 3 2 1 1
## 173 yes yes yes yes no 4 4 4 1 3
## 174 yes no yes yes yes 4 3 5 1 1
## 175 yes yes yes yes no 4 4 5 1 1
## 176 yes yes yes yes no 4 4 4 4 4
## 177 yes no yes yes no 3 4 4 1 4
## 178 yes no yes yes no 4 3 4 1 4
## 179 yes yes yes yes yes 4 3 3 3 4
## 180 yes yes yes yes yes 5 2 3 1 1
## 181 yes yes yes yes no 3 4 3 2 3
## 182 yes yes yes yes yes 4 2 3 1 2
## 183 yes yes yes no no 5 4 2 2 3
## 184 yes yes yes yes yes 5 3 3 2 3
## 185 no yes yes yes no 1 2 2 1 2
## 186 yes yes yes yes yes 4 3 4 2 3
## 187 yes yes yes yes yes 3 3 3 1 2
## 188 yes yes yes yes yes 4 2 3 1 2
## 189 no no yes yes yes 3 3 3 1 3
## 190 no yes yes no no 3 1 3 1 5
## 191 no yes yes yes no 4 3 3 1 1
## 192 yes yes yes yes no 5 3 3 1 1
## 193 yes no yes yes no 4 4 4 4 5
## 194 yes yes yes yes no 4 3 2 3 4
## 195 no yes yes yes no 5 3 3 1 1
## 196 yes yes yes yes yes 4 3 2 1 1
## 197 no yes yes yes no 5 2 3 1 2
## 198 yes yes yes yes no 3 3 4 3 5
## 199 no yes yes yes no 4 2 4 2 3
## 200 no yes yes yes no 4 5 2 1 2
## 201 yes yes yes yes no 4 3 5 1 5
## 202 yes yes yes no no 4 4 3 1 3
## 203 no no yes no no 4 4 4 1 3
## 204 no yes yes yes no 5 3 2 1 2
## 205 yes no yes yes no 5 3 5 1 1
## 206 no yes yes yes yes 4 4 3 3 4
## 207 no yes yes yes no 2 3 3 2 2
## 208 yes yes yes yes yes 1 3 2 1 1
## 209 no yes yes no no 4 3 2 1 4
## 210 yes yes yes yes yes 4 4 2 1 1
## 211 yes yes yes yes no 4 3 3 1 2
## 212 no yes yes yes yes 5 3 5 4 5
## 213 no yes yes yes no 3 3 4 1 1
## 214 yes yes yes yes no 4 4 4 2 4
## 215 no yes yes no no 5 2 1 1 2
## 216 no yes yes yes no 4 4 4 1 3
## 217 no yes yes yes yes 3 4 5 2 4
## 218 no yes yes yes no 3 2 4 2 4
## 219 no yes yes no no 3 3 3 1 4
## 220 yes yes yes yes no 4 3 3 1 1
## 221 yes yes yes yes no 4 2 5 1 2
## 222 yes yes yes no yes 4 3 4 1 1
## 223 no yes yes yes no 2 3 1 1 1
## 224 no yes yes yes no 3 3 3 5 5
## 225 yes no yes yes no 5 3 2 1 1
## 226 yes yes yes yes yes 5 3 3 1 1
## 227 yes no yes yes no 5 3 4 1 3
## 228 no no yes yes no 5 3 3 1 3
## 229 yes yes yes yes yes 4 3 2 4 5
## 230 yes yes yes yes yes 3 2 3 1 2
## 231 yes yes yes yes yes 3 2 3 1 2
## 232 yes yes yes yes no 4 5 2 1 1
## 233 yes yes yes yes yes 4 5 5 1 3
## 234 yes yes yes yes no 4 2 4 2 4
## 235 no yes yes yes no 3 4 2 1 1
## 236 yes yes yes yes yes 5 3 3 1 3
## 237 yes no yes yes yes 4 4 2 5 5
## 238 no yes yes yes yes 4 5 2 1 1
## 239 yes yes yes no no 2 1 1 1 1
## 240 no yes no yes no 5 5 4 3 5
## 241 yes yes yes yes yes 2 5 5 1 4
## 242 no yes yes yes no 3 3 3 2 3
## 243 yes no yes yes no 5 4 5 1 1
## 244 yes yes yes yes no 5 3 2 1 2
## 245 no no yes yes yes 4 4 4 1 1
## 246 no yes yes yes no 4 3 3 1 1
## 247 no yes yes yes no 5 2 2 1 1
## 248 no no no yes yes 5 4 5 5 5
## 249 no yes yes yes yes 4 3 3 1 3
## 250 no no yes yes no 4 3 2 2 4
## 251 no yes no yes no 4 4 5 2 4
## 252 no no yes yes no 5 3 3 1 3
## 253 no no no yes no 3 2 5 2 5
## 254 yes no yes no no 3 3 2 1 3
## 255 no no yes yes no 4 4 2 2 4
## 256 yes yes yes yes no 4 4 4 1 2
## 257 yes yes yes yes no 4 2 3 1 1
## 258 no yes yes yes no 4 3 1 1 1
## 259 yes yes yes yes no 5 2 4 1 2
## 260 yes yes yes yes yes 3 4 1 1 1
## 261 no yes yes yes yes 3 1 2 1 3
## 262 no no yes yes no 4 3 2 1 1
## 263 yes no yes no no 5 3 2 1 1
## 264 yes no yes no no 3 2 3 1 1
## 265 yes yes yes yes yes 4 3 3 1 1
## 266 yes yes yes yes no 4 2 5 3 4
## 267 yes yes yes yes yes 5 4 4 3 4
## 268 yes yes yes yes no 4 3 4 2 2
## 269 yes yes yes yes yes 5 4 5 1 3
## 270 no yes no yes yes 4 3 5 1 2
## 271 yes yes yes yes no 4 3 5 3 3
## 272 yes yes yes yes yes 4 5 5 1 3
## 273 no no yes no no 4 4 3 1 1
## 274 yes no yes no yes 3 5 2 2 2
## 275 no yes yes yes yes 4 3 3 1 1
## 276 no yes yes yes yes 4 4 4 2 3
## 277 no no no yes yes 4 1 1 1 1
## 278 yes yes yes yes no 3 2 4 1 4
## 279 yes yes yes yes yes 2 4 4 1 1
## 280 yes yes yes yes no 4 2 3 1 2
## 281 yes yes yes yes yes 4 5 4 2 4
## 282 no yes yes yes no 4 4 4 3 4
## 283 yes yes yes no no 5 2 2 1 1
## 284 yes yes yes yes no 5 4 4 1 1
## 285 no no yes yes no 5 4 5 1 2
## 286 no no yes yes no 4 3 3 1 2
## 287 no yes yes yes no 4 3 3 1 2
## 288 no yes yes yes no 4 3 3 1 1
## 289 yes yes yes yes no 4 2 4 1 3
## 290 yes yes yes yes no 5 4 3 1 1
## 291 yes yes yes yes yes 4 3 2 1 4
## 292 no yes yes yes no 4 2 2 1 2
## 293 no yes yes yes yes 5 4 3 1 1
## 294 no yes yes no no 3 1 2 1 1
## 295 yes yes yes yes no 5 4 2 1 1
## 296 no yes yes yes no 4 4 3 1 3
## 297 yes yes yes yes no 2 3 4 2 3
## 298 no yes yes yes yes 4 4 5 1 2
## 299 no yes yes yes no 4 3 3 1 1
## 300 no yes yes yes yes 1 4 2 2 2
## 301 no yes yes yes yes 4 2 4 1 1
## 302 no yes yes yes no 4 1 1 2 2
## 303 no yes yes yes no 4 3 3 1 1
## 304 yes no yes yes no 5 2 2 1 2
## 305 yes yes yes yes yes 4 4 4 1 1
## 306 yes yes yes yes no 4 4 3 1 1
## 307 yes yes yes no no 5 5 3 1 1
## 308 no yes yes yes yes 4 3 4 1 1
## 309 yes yes yes no yes 4 5 3 1 2
## 310 yes no yes yes no 4 4 3 1 3
## 311 yes no yes no yes 4 2 4 2 2
## 312 no yes no yes yes 3 4 1 1 1
## 313 no no yes yes no 4 5 2 2 2
## 314 no no yes yes yes 4 2 2 1 2
## 315 no no yes yes yes 4 1 2 1 1
## 316 no yes yes yes yes 4 1 2 1 1
## 317 yes yes yes yes no 5 3 3 1 2
## 318 yes yes yes yes yes 4 3 4 1 1
## 319 yes no yes yes no 4 3 4 2 5
## 320 no yes yes yes no 4 4 4 3 3
## 321 no yes yes yes yes 5 2 2 1 2
## 322 no yes yes no yes 4 2 2 1 1
## 323 yes yes yes yes no 3 3 2 2 2
## 324 no no yes yes no 3 4 3 2 3
## 325 no yes yes yes no 3 3 3 2 3
## 326 yes yes yes yes no 4 3 3 2 2
## 327 yes no yes yes no 4 3 5 3 5
## 328 no yes yes yes no 4 4 5 5 5
## 329 yes yes yes yes no 5 4 4 1 3
## 330 no no yes yes yes 4 3 3 1 2
## 331 yes yes yes yes no 4 5 5 2 4
## 332 no yes yes yes yes 4 4 3 1 1
## 333 yes yes yes yes no 5 3 4 1 1
## 334 yes no yes yes yes 4 3 3 1 1
## 335 yes yes yes no no 4 4 4 1 1
## 336 no yes yes yes no 4 4 5 1 3
## 337 no yes yes no no 5 4 3 1 2
## 338 no yes yes yes yes 4 3 2 2 3
## 339 no yes yes yes no 5 3 3 1 1
## 340 no yes yes yes no 4 3 3 2 3
## 341 yes yes yes yes yes 4 3 4 1 3
## 342 yes yes yes yes no 4 3 3 2 2
## 343 yes yes yes yes yes 4 3 3 1 3
## 344 no yes yes yes yes 3 3 1 1 2
## 345 no yes yes yes no 4 3 3 1 2
## 346 no yes yes yes yes 5 4 3 2 3
## 347 no yes yes yes yes 5 3 2 1 2
## 348 no yes yes yes yes 5 4 5 2 3
## 349 yes yes yes yes yes 4 4 3 1 3
## 350 no no yes yes no 2 5 5 5 5
## 351 no yes yes yes no 5 4 4 3 3
## 352 no yes yes yes no 4 5 4 2 3
## 353 no yes no yes yes 4 3 3 2 3
## 354 no yes yes yes no 4 4 4 3 3
## 355 yes no yes yes yes 4 5 5 1 3
## 356 no yes yes no yes 5 3 4 1 1
## 357 yes yes yes yes no 4 3 3 1 2
## 358 no yes yes no yes 1 2 3 1 2
## 359 no no yes yes yes 3 3 2 1 2
## 360 no yes yes yes no 5 3 2 1 1
## 361 no yes yes no yes 4 3 4 1 4
## 362 yes no no no no 4 4 3 2 3
## 363 no yes yes yes yes 4 3 2 1 3
## 364 yes yes yes yes yes 2 3 4 1 1
## 365 no no yes no no 3 2 2 1 2
## 366 no yes yes no no 3 3 4 2 4
## 367 no yes yes yes yes 4 2 2 2 2
## 368 no yes yes yes yes 5 2 1 1 2
## 369 no yes yes yes yes 5 2 3 1 2
## 370 no no yes yes yes 3 2 2 4 2
## 371 yes yes yes no yes 3 2 2 1 1
## 372 yes yes no yes yes 4 3 3 2 3
## 373 yes yes yes no yes 3 4 3 1 1
## 374 yes yes yes yes no 3 5 5 1 3
## 375 no yes yes yes no 5 4 4 1 1
## 376 no yes yes yes no 4 3 2 1 2
## 377 no no yes yes yes 5 4 3 1 1
## 378 yes yes yes yes no 5 4 3 3 4
## 379 no yes yes yes yes 4 1 3 1 2
## 380 yes no yes yes no 4 5 4 2 3
## 381 yes no yes yes no 3 2 4 1 4
## 382 yes no yes yes yes 4 4 3 1 3
## 383 yes yes yes yes no 4 4 3 1 1
## 384 no yes yes no no 4 3 2 1 3
## 385 no yes yes no no 5 4 3 4 3
## 386 no yes yes no no 5 3 3 1 3
## 387 yes yes yes yes yes 4 4 3 2 2
## 388 yes no yes yes no 5 4 2 1 2
## 389 no yes yes yes no 4 3 4 1 1
## 390 yes yes yes no no 1 1 1 1 1
## 391 no yes yes no no 5 5 4 4 5
## 392 no no yes yes no 2 4 5 3 4
## 393 no no yes no no 5 5 3 3 3
## 394 no no yes yes no 4 4 1 3 4
## 395 no yes yes yes no 3 2 3 3 3
## health absences G1 G2 G3
## 1 3 6 5 6 6
## 2 3 4 5 5 6
## 3 3 10 7 8 10
## 4 5 2 15 14 15
## 5 5 4 6 10 10
## 6 5 10 15 15 15
## 7 3 0 12 12 11
## 8 1 6 6 5 6
## 9 1 0 16 18 19
## 10 5 0 14 15 15
## 11 2 0 10 8 9
## 12 4 4 10 12 12
## 13 5 2 14 14 14
## 14 3 2 10 10 11
## 15 3 0 14 16 16
## 16 2 4 14 14 14
## 17 2 6 13 14 14
## 18 4 4 8 10 10
## 19 5 16 6 5 5
## 20 5 4 8 10 10
## 21 1 0 13 14 15
## 22 5 0 12 15 15
## 23 5 2 15 15 16
## 24 5 0 13 13 12
## 25 5 2 10 9 8
## 26 5 14 6 9 8
## 27 5 2 12 12 11
## 28 1 4 15 16 15
## 29 5 4 11 11 11
## 30 5 16 10 12 11
## 31 5 0 9 11 12
## 32 5 0 17 16 17
## 33 5 0 17 16 16
## 34 2 0 8 10 12
## 35 5 0 12 14 15
## 36 5 0 8 7 6
## 37 4 2 15 16 18
## 38 5 7 15 16 15
## 39 5 2 12 12 11
## 40 2 8 14 13 13
## 41 3 25 7 10 11
## 42 5 8 12 12 12
## 43 5 2 19 18 18
## 44 1 0 8 8 11
## 45 5 14 10 10 9
## 46 5 8 8 8 6
## 47 3 12 11 12 11
## 48 2 4 19 19 20
## 49 5 2 15 15 14
## 50 3 2 7 7 7
## 51 4 2 12 13 13
## 52 5 2 11 13 13
## 53 5 6 11 11 10
## 54 5 0 8 10 11
## 55 1 6 10 13 13
## 56 2 8 8 9 10
## 57 1 0 14 15 15
## 58 5 4 14 15 15
## 59 5 2 9 10 9
## 60 5 2 15 16 16
## 61 4 6 10 11 11
## 62 5 6 10 8 11
## 63 1 4 8 10 9
## 64 4 2 10 9 9
## 65 2 0 10 10 10
## 66 1 2 16 15 15
## 67 3 4 13 13 12
## 68 5 4 7 7 6
## 69 4 2 8 9 8
## 70 3 12 16 16 16
## 71 5 0 13 15 15
## 72 3 0 10 10 10
## 73 5 2 8 6 5
## 74 5 2 12 12 14
## 75 5 54 11 12 11
## 76 5 6 9 9 10
## 77 1 8 11 11 10
## 78 3 0 11 11 11
## 79 3 2 8 8 10
## 80 3 12 5 5 5
## 81 3 2 10 12 12
## 82 5 4 11 10 11
## 83 5 10 7 6 6
## 84 4 4 15 15 15
## 85 4 2 9 10 10
## 86 5 6 7 9 8
## 87 2 4 8 7 6
## 88 1 4 13 14 14
## 89 3 12 11 10 10
## 90 5 18 8 6 7
## 91 4 0 7 7 8
## 92 1 4 16 17 18
## 93 2 4 7 6 6
## 94 1 0 11 10 10
## 95 4 6 11 13 14
## 96 1 2 7 10 10
## 97 4 2 11 15 15
## 98 5 2 8 9 10
## 99 1 6 11 14 14
## 100 3 0 7 9 8
## 101 4 14 7 7 5
## 102 4 0 16 17 17
## 103 5 4 10 13 14
## 104 2 26 7 6 6
## 105 1 0 16 18 18
## 106 4 10 10 11 11
## 107 3 8 7 8 8
## 108 5 2 16 18 18
## 109 1 6 10 13 13
## 110 4 4 14 15 16
## 111 4 6 18 19 19
## 112 2 0 7 10 10
## 113 5 6 10 13 13
## 114 3 10 18 19 19
## 115 5 8 9 9 9
## 116 5 2 15 15 16
## 117 2 2 11 13 14
## 118 5 0 13 14 13
## 119 5 20 9 7 8
## 120 4 6 14 13 13
## 121 1 2 16 15 15
## 122 5 6 16 14 15
## 123 5 2 13 13 13
## 124 5 18 14 11 13
## 125 5 0 8 7 8
## 126 5 0 13 13 12
## 127 1 0 7 10 11
## 128 5 2 7 8 9
## 129 4 0 7 4 0
## 130 4 8 18 18 18
## 131 5 0 12 0 0
## 132 4 0 8 0 0
## 133 5 12 10 13 12
## 134 5 16 12 11 11
## 135 5 0 9 0 0
## 136 5 0 11 0 0
## 137 5 0 10 0 0
## 138 5 0 4 0 0
## 139 5 0 14 12 12
## 140 5 0 16 16 15
## 141 3 0 7 9 0
## 142 2 8 9 9 9
## 143 5 2 9 11 11
## 144 1 2 14 14 13
## 145 5 0 5 0 0
## 146 5 0 8 11 11
## 147 3 0 6 7 0
## 148 5 2 10 11 11
## 149 5 0 7 6 0
## 150 5 0 8 9 10
## 151 4 0 6 5 0
## 152 5 6 12 13 14
## 153 3 8 10 10 10
## 154 4 0 5 0 0
## 155 4 0 11 11 12
## 156 1 2 11 8 8
## 157 5 8 16 12 13
## 158 4 6 9 8 10
## 159 3 2 17 15 15
## 160 5 4 10 12 12
## 161 5 0 7 6 0
## 162 3 6 5 9 7
## 163 5 0 7 0 0
## 164 2 2 10 10 10
## 165 5 0 5 8 7
## 166 2 16 12 11 12
## 167 4 4 10 10 10
## 168 3 0 14 15 16
## 169 4 0 6 7 0
## 170 3 0 14 14 14
## 171 2 0 6 5 0
## 172 3 2 13 15 16
## 173 5 0 13 11 10
## 174 3 0 8 7 0
## 175 4 4 10 11 9
## 176 4 4 10 9 9
## 177 5 2 13 13 11
## 178 4 4 6 5 6
## 179 3 10 10 8 9
## 180 2 4 10 10 11
## 181 3 10 9 8 8
## 182 3 2 12 13 12
## 183 5 0 16 17 17
## 184 1 56 9 9 8
## 185 1 14 12 13 12
## 186 4 12 12 12 11
## 187 3 2 11 12 11
## 188 5 0 15 15 15
## 189 3 6 8 7 9
## 190 3 4 8 9 10
## 191 2 10 11 12 13
## 192 3 0 8 8 9
## 193 5 12 7 8 8
## 194 5 8 8 9 10
## 195 3 0 13 14 14
## 196 5 0 14 15 15
## 197 5 4 17 15 16
## 198 3 8 9 9 10
## 199 2 24 18 18 18
## 200 3 0 9 9 10
## 201 2 2 16 16 16
## 202 4 6 8 10 10
## 203 1 4 9 9 10
## 204 3 18 7 6 6
## 205 5 6 10 10 11
## 206 5 28 10 9 9
## 207 4 5 7 7 7
## 208 1 10 11 12 13
## 209 5 6 9 9 10
## 210 4 6 7 7 7
## 211 3 10 8 8 8
## 212 3 13 12 12 13
## 213 4 0 12 13 14
## 214 5 15 6 7 8
## 215 3 12 8 10 10
## 216 1 2 14 15 15
## 217 1 22 6 6 4
## 218 4 13 6 6 8
## 219 3 3 7 7 8
## 220 4 4 9 10 10
## 221 5 2 6 6 6
## 222 5 0 6 5 0
## 223 3 2 16 16 17
## 224 4 0 12 13 13
## 225 5 0 13 13 14
## 226 4 16 9 8 7
## 227 3 10 16 15 15
## 228 3 2 12 11 12
## 229 3 14 10 8 9
## 230 3 10 12 10 12
## 231 3 14 13 13 14
## 232 1 4 11 11 11
## 233 2 14 11 9 9
## 234 1 2 14 13 13
## 235 5 18 9 7 6
## 236 2 10 11 9 10
## 237 4 4 14 13 13
## 238 5 20 13 12 12
## 239 3 2 13 11 11
## 240 2 0 7 7 0
## 241 5 14 12 12 12
## 242 4 2 10 11 12
## 243 3 0 6 0 0
## 244 5 0 13 12 12
## 245 3 0 7 0 0
## 246 4 6 18 18 18
## 247 2 4 12 12 13
## 248 1 16 6 8 8
## 249 5 8 3 5 5
## 250 5 0 13 15 15
## 251 5 0 6 8 8
## 252 2 6 7 10 10
## 253 5 4 6 9 8
## 254 3 0 8 9 8
## 255 5 0 8 12 12
## 256 5 2 7 9 8
## 257 4 6 14 12 13
## 258 1 12 11 11 11
## 259 4 8 15 14 14
## 260 2 0 10 9 0
## 261 2 21 17 18 18
## 262 3 2 8 8 8
## 263 3 1 13 12 12
## 264 4 4 10 9 9
## 265 3 0 9 10 0
## 266 1 13 17 17 17
## 267 5 2 9 9 10
## 268 4 8 12 10 11
## 269 5 10 10 9 10
## 270 3 0 6 0 0
## 271 5 15 9 9 9
## 272 2 4 15 14 14
## 273 3 2 11 11 11
## 274 1 2 15 14 14
## 275 1 2 10 10 10
## 276 5 6 12 12 12
## 277 5 75 10 9 9
## 278 3 22 9 9 9
## 279 4 15 9 8 8
## 280 1 8 10 11 10
## 281 5 30 8 8 8
## 282 3 19 11 9 10
## 283 3 1 12 12 12
## 284 4 4 8 9 10
## 285 5 4 10 9 11
## 286 4 2 12 10 11
## 287 2 5 18 18 19
## 288 3 6 13 12 12
## 289 2 6 15 14 14
## 290 2 9 15 13 15
## 291 5 11 12 11 11
## 292 3 0 15 15 15
## 293 5 12 12 12 13
## 294 3 6 18 18 18
## 295 4 8 14 13 14
## 296 5 4 14 12 11
## 297 2 0 10 9 0
## 298 2 10 10 8 8
## 299 3 0 14 13 14
## 300 1 5 16 15 16
## 301 4 14 12 10 11
## 302 5 0 11 11 10
## 303 3 0 15 12 14
## 304 5 0 17 17 18
## 305 3 20 15 14 13
## 306 3 8 14 12 12
## 307 5 0 17 18 18
## 308 4 38 8 9 8
## 309 5 0 15 12 12
## 310 3 18 12 10 10
## 311 3 0 9 9 0
## 312 2 20 14 12 13
## 313 4 3 13 11 11
## 314 1 22 13 10 11
## 315 3 14 15 13 13
## 316 3 40 13 11 11
## 317 1 0 8 8 0
## 318 5 9 9 10 9
## 319 5 0 11 11 10
## 320 5 2 11 11 11
## 321 5 23 13 13 13
## 322 3 12 11 9 9
## 323 3 3 11 11 11
## 324 5 1 12 14 15
## 325 2 0 16 15 15
## 326 3 3 9 12 11
## 327 5 3 14 15 16
## 328 4 8 11 10 10
## 329 4 7 10 9 9
## 330 4 4 14 14 14
## 331 5 2 9 8 8
## 332 5 7 12 14 14
## 333 4 0 7 0 0
## 334 2 0 8 8 0
## 335 4 0 10 9 0
## 336 5 16 16 15 15
## 337 5 12 14 13 13
## 338 2 0 7 8 0
## 339 1 7 16 15 17
## 340 2 4 9 10 10
## 341 3 4 11 12 11
## 342 2 0 10 10 0
## 343 5 11 16 15 15
## 344 4 0 9 8 0
## 345 3 4 11 10 10
## 346 1 7 13 13 14
## 347 4 9 16 15 16
## 348 5 0 10 10 9
## 349 4 0 13 15 15
## 350 5 10 11 13 13
## 351 2 8 8 7 8
## 352 3 2 13 13 13
## 353 3 7 8 7 8
## 354 5 4 8 8 8
## 355 2 4 13 11 11
## 356 5 0 10 9 9
## 357 5 4 12 13 13
## 358 5 2 12 12 11
## 359 3 4 10 10 10
## 360 4 0 18 16 16
## 361 5 0 13 13 13
## 362 5 2 13 12 12
## 363 3 0 11 11 10
## 364 1 0 16 15 15
## 365 3 0 12 11 12
## 366 3 4 10 10 10
## 367 5 0 13 13 13
## 368 1 0 7 6 0
## 369 4 0 11 10 10
## 370 5 10 14 12 11
## 371 3 4 7 7 9
## 372 3 3 14 12 12
## 373 3 8 13 11 11
## 374 1 14 6 5 5
## 375 1 0 19 18 19
## 376 4 2 8 8 10
## 377 3 4 15 14 15
## 378 2 4 8 9 10
## 379 1 0 15 15 15
## 380 1 17 10 10 10
## 381 2 4 15 14 14
## 382 5 5 7 6 7
## 383 3 2 11 11 10
## 384 5 0 6 5 0
## 385 3 14 6 5 5
## 386 4 2 10 9 10
## 387 5 7 6 5 6
## 388 5 0 7 5 0
## 389 1 0 7 9 8
## 390 5 0 6 5 0
## 391 4 11 9 9 9
## 392 2 3 14 16 16
## 393 3 3 10 8 7
## 394 5 0 11 12 10
## 395 5 5 8 9 9
sapply(data,function(x) sum(is.na(x)))
## Warning in is.na(x): is.na() applied to non-(list or vector) of type 'symbol'
## Warning in is.na(x): is.na() applied to non-(list or vector) of type 'language'
## Warning in is.na(x): is.na() applied to non-(list or vector) of type 'language'
## Warning in is.na(x): is.na() applied to non-(list or vector) of type 'symbol'
## Warning in is.na(x): is.na() applied to non-(list or vector) of type 'language'
## ... list package lib.loc verbose envir overwrite
## 0 0 0 0 0 0 0 0
table(student_df$school)%>%
sort()
##
## MS GP
## 46 349
student_df%>%
filter(school == "GP" | school == "MS") %>%
group_by(school, sex)%>%
arrange(sex)
## # A tibble: 395 x 33
## # Groups: school, sex [4]
## school sex age address famsize Pstatus Medu Fedu Mjob Fjob reason
## <chr> <chr> <int> <chr> <chr> <chr> <int> <int> <chr> <chr> <chr>
## 1 GP F 18 U GT3 A 4 4 at_home teach~ course
## 2 GP F 17 U GT3 T 1 1 at_home other course
## 3 GP F 15 U LE3 T 1 1 at_home other other
## 4 GP F 15 U GT3 T 4 2 health servi~ home
## 5 GP F 16 U GT3 T 3 3 other other home
## 6 GP F 17 U GT3 A 4 4 other teach~ home
## 7 GP F 15 U GT3 T 4 4 teacher health reput~
## 8 GP F 15 U GT3 T 2 1 services other reput~
## 9 GP F 16 U GT3 T 4 4 health other home
## 10 GP F 16 U GT3 T 4 4 services servi~ reput~
## # ... with 385 more rows, and 22 more variables: guardian <chr>,
## # traveltime <int>, studytime <int>, failures <int>, schoolsup <chr>,
## # famsup <chr>, paid <chr>, activities <chr>, nursery <chr>, higher <chr>,
## # internet <chr>, romantic <chr>, famrel <int>, freetime <int>, goout <int>,
## # Dalc <int>, Walc <int>, health <int>, absences <int>, G1 <int>, G2 <int>,
## # G3 <int>
student_df1<- paste(student_df$school, student_df$sex)
table(student_df1)
## student_df1
## GP F GP M MS F MS M
## 183 166 25 21
summary(student_df)
## school sex age address
## Length:395 Length:395 Min. :15.0 Length:395
## Class :character Class :character 1st Qu.:16.0 Class :character
## Mode :character Mode :character Median :17.0 Mode :character
## Mean :16.7
## 3rd Qu.:18.0
## Max. :22.0
## famsize Pstatus Medu Fedu
## Length:395 Length:395 Min. :0.000 Min. :0.000
## Class :character Class :character 1st Qu.:2.000 1st Qu.:2.000
## Mode :character Mode :character Median :3.000 Median :2.000
## Mean :2.749 Mean :2.522
## 3rd Qu.:4.000 3rd Qu.:3.000
## Max. :4.000 Max. :4.000
## Mjob Fjob reason guardian
## Length:395 Length:395 Length:395 Length:395
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## traveltime studytime failures schoolsup
## Min. :1.000 Min. :1.000 Min. :0.0000 Length:395
## 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:0.0000 Class :character
## Median :1.000 Median :2.000 Median :0.0000 Mode :character
## Mean :1.448 Mean :2.035 Mean :0.3342
## 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:0.0000
## Max. :4.000 Max. :4.000 Max. :3.0000
## famsup paid activities nursery
## Length:395 Length:395 Length:395 Length:395
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## higher internet romantic famrel
## Length:395 Length:395 Length:395 Min. :1.000
## Class :character Class :character Class :character 1st Qu.:4.000
## Mode :character Mode :character Mode :character Median :4.000
## Mean :3.944
## 3rd Qu.:5.000
## Max. :5.000
## freetime goout Dalc Walc
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:3.000 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000
## Median :3.000 Median :3.000 Median :1.000 Median :2.000
## Mean :3.235 Mean :3.109 Mean :1.481 Mean :2.291
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:2.000 3rd Qu.:3.000
## Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000
## health absences G1 G2
## Min. :1.000 Min. : 0.000 Min. : 3.00 Min. : 0.00
## 1st Qu.:3.000 1st Qu.: 0.000 1st Qu.: 8.00 1st Qu.: 9.00
## Median :4.000 Median : 4.000 Median :11.00 Median :11.00
## Mean :3.554 Mean : 5.709 Mean :10.91 Mean :10.71
## 3rd Qu.:5.000 3rd Qu.: 8.000 3rd Qu.:13.00 3rd Qu.:13.00
## Max. :5.000 Max. :75.000 Max. :19.00 Max. :19.00
## G3
## Min. : 0.00
## 1st Qu.: 8.00
## Median :11.00
## Mean :10.42
## 3rd Qu.:14.00
## Max. :20.00
###1. First Period Grade: ###a. Minimum score is 3, and maximum score achieved is 19. The mean score is 10.91. ###b. The median is 11. ###2. Second Period Grade: ###3. Final Grade: ###a. The max score is 20 and the mean score is 10.42, making the mean final grade the lowest of all averages for first and second period grades.
data1<-dplyr::select(student_df, age, Medu, Fedu, traveltime, studytime, failures, famrel, freetime, goout, Dalc, Walc, health, absences, G1, G2, G3)
multi.hist(data1, freq=F, dcol = "blue", dlty=c("dotted", "solid"))
### According to the multi histogram, I can see the distribution of each variable. I can concluse that the ages of the students include mid teens, up to students of the age of 20. I can also conclude that most students have a medium level of family relationships and freetime. There’s also an pretty even distribution of period 1,2, and 3 scores. There are some outliers seen in the “absences” variable and it seems like most students don’t fail.
student_df5<-
student_df %>%
mutate(period_grade = case_when(G3 < 6.5 ~ 'Failing',
G3 < 13 ~ 'Good',
G3 < 20.1 ~ 'Very Good'))
ggplot(data= student_df5, aes(x = G3, y = G2, color = period_grade)) +
geom_point()+
facet_wrap(~period_grade)+
labs(title = "Final Grade x Second Period Grade")+
geom_smooth(method=lm , color="red", fill="#69b3a2", se=TRUE)
## `geom_smooth()` using formula 'y ~ x'
student_df %>%
gather(`G1`, `G2`,`G3` , key="Period", value="grade") %>%
ggplot() +
geom_bar(aes(x= grade, fill=Period), position="dodge") +
ggtitle("Distribution of Three Period")
ggplot(student_df) +
geom_bar(aes(x=school, fill=as.factor(G3)), position="dodge")+
ggtitle("Distribution of Final Grades by School") +
theme(legend.position = "left")
ggplot(student_df, aes(x=G3)) +
geom_density(aes(color=as.factor(Mjob))) +
ggtitle("Distribution of Students' Grades by Mothers' Job")
ggplot(student_df, aes(x=G3)) +
geom_density(aes(color=as.factor(Fjob))) +
ggtitle("Distribution of Students' Grades by Fathers' Job")
ggplot(student_df, aes(x=G3, color=Fjob, fill=Fjob)) +
geom_density(alpha=0.4) +
labs(title = "Final Grade According to Father's Job",
x = "G3",
y = "Father's Job")
ggplot(student_df, aes(x=G3)) +
geom_density(aes(color=as.factor(schoolsup))) +
ggtitle("Distribution of Students' Grades by School Support")
ggplot(student_df, aes(x=G3)) +
geom_density(aes(color=as.factor(famsup))) +
ggtitle("Distribution of Students' Grades by Family Support")
ggplot(student_df, aes(x = G3, fill = paid)) +
geom_bar(position = "dodge") +
theme(axis.text.x = element_text(angle = 90)) +
ylab("Extra Paid Classes ") + xlab("G3")+ coord_flip()
ggplot(student_df, aes(x = G3, fill = nursery)) +
geom_bar(position = "dodge") +
theme(axis.text.x = element_text(angle = 90)) +
ylab("Nursery") + xlab("G3")+ coord_flip()
ggplot(student_df, aes(x = G3, fill = internet)) +
geom_bar(position = "dodge") +
theme(axis.text.x = element_text(angle = 90)) +
ylab("Internet") + xlab("G3")+ coord_flip()
ggplot(student_df, aes(x = G3, fill = higher)) +
geom_bar(position = "dodge") +
theme(axis.text.x = element_text(angle = 90)) +
ylab("Wants Higher Education") + xlab("G3")+ coord_flip()
M = cor(data1)
corrplot(M, type = 'upper', order = 'hclust', tl.col = 'black',
cl.ratio = 0.2, tl.srt = 45, col = COL2('RdBu', 10))
highchart () %>%
hc_add_series(data = student_df5,
type = "bar",
hcaes(x = traveltime,
y = G3,
group = period_grade, ))%>%
hc_title(
text=" Effect of Travel Time on Grades")%>%
hc_xAxis(
title = list(text="Travel Time")) %>%
hc_yAxis(
title = list(text="Final Grade")) %>%
hc_legend(align = "right",
verticalAlign = "top")