My database

I use the database I found in Mendeley Data web page. So far, we do not now many things about the database. Hopefully, the situation changes in a very short time.

adat <-read.csv2("Kornel.csv")   # conversion from csv to data.frame

knitr::kable(head(adat[, 1:8]), "pipe")                       #printing the first 5 records on the screen to check, whether everything is correct
Gender Age Education Tenure Position JS1 JS2 JS3
1 5 1 3 3 4 4 4
1 5 1 3 3 5 5 5
1 5 1 3 3 4 1 4
1 5 1 3 3 1 1 4
1 5 1 3 3 2 4 1
1 5 1 3 3 5 3 4

Missing data - eliminating the rows

We want to get overview about missing data in our database. The Amelia package solves it.

library(Amelia)
## Loading required package: Rcpp
## ## 
## ## Amelia II: Multiple Imputation
## ## (Version 1.8.1, built: 2022-11-18)
## ## Copyright (C) 2005-2023 James Honaker, Gary King and Matthew Blackwell
## ## Refer to http://gking.harvard.edu/amelia/ for more information
## ##
missmap(adat)
A nice image.

A nice image.

# we eliminate the rows with missing data

na.omit(adat)

Working with graphics

library(ggplot2)
ggplot(adat, aes(x=Education, y=Position)) + 
    geom_point()
## Warning: Removed 1 rows containing missing values (`geom_point()`).

A nice image.