Development of an algorithm based on logical operations to detect patterns in data with missing values