# Analyzing Port State Control Data to Explore Future Improvements to GMDSS Training
## Materials and Methods
### Data Management  
The structure of the database has changed over the years, and homogenization work has had to be done, which has resulted in the need to work with different aggregated variables. Not all the data were employed for all the possible analyses. MATLAB 2022a was used to create different scripts to post-process the raw data, as described below:  
The treatment of explanatory (independent) variables. * The 133 different flags of the vessels were finally codified in four categories, a white, grey, black list, and a four-category \"out-of-the-list\". This categorization has been made taking into consideration the year of the inspection, as the WGB list is updated according to the information released by the MoU of Paris about the risk performance of flags. * The 27 different types of ships were grouped into four categories: passenger ships, cargo ships, tankers, and other purposes ships. * The age of the ship at the moment of inspection ranges from 0 to 112 years. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{3}{c}{**Data Related to Possible Deficiencies in the Training of OOWs**} \\ \hline  & **Inspections** & **Ship Age** & **Ships** & **Deficiencies** \\ \hline  & \multicolumn{3}{c}{**Number of Inspections**} & \multicolumn{1}{c}{**Total Number of**} & \multicolumn{1}{c}{**Total Number of Radio**} \\
**Years** & \multicolumn{3}{c}{**Involved Training**} & **Averaged Age** & **Different Ships** & **Deficiencies Identified with** \\  & \multicolumn{3}{c}{**Deficiencies per Year**} & \multicolumn{1}{c}{**Involved per Year**} & \multicolumn{1}{c}{**Training per Year**} \\ \hline  
& 393 & 411 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Summary of the Radio Communications inspections (year by year) that detect deficiencies that can be used as an indicator of lack of competencies of the deck officers responsible for the GMDSS. * The 27 country's ports were reduced to only two categories: Mediterranean ports (Black Sea ports included) and Atlantic ports (Baltic Sea ports included). The processing of dependent variables. A disaggregated list of radio defective codes found per inspection date and per ship needs several transformations before providing an adequate data structure for all analyses planned to respond to the objectives. The universe of data comprises the total number of inspections of ships that have shown GDMSG deficiencies. Therefore, a classification process is necessary to filter out a subset of ships based on their safety communications performance scores. When the original annual data from Table 1 is consolidated into a single database spanning all 18 years, the inspection database contains a total of 23,275 inspections, the vessel database contains 13,178 vessels, and the defective code database contains 30,911 codes, as already mentioned. The databases exchange and recalculate information with each other. For example, in the inspection database, a specific ship is recorded with inspection details such as the date, the flag on that date, the age of the vessel during the inspection, the port of inspection, etc. But it also includes extensive about the same ship spanning 18 years, such as the total number of inspections conducted and the total count and type of deficiencies identified during the period. Accounting for this information allows for the sorting and classification of ships using various criteria, such as the number of inspections, the number (and types) of radio failures, and other variables. This study introduces two criteria (Table 4), namely 2 and 3, as they are based on the annual information provided in Tables 2 and 3. Criterion 2. The count of the total number of inspections in which defective codes that caused detention were found per ship within the period of time considered (18 years) would lead directly to a \"High-Risk-Subset\". A less strict version of criterion 2 assigned this count (value) to all the inspections in which this particular ship was presented. Criterion 3.