A method of diabetes analysis includes receiving a plurality of glucose
level readings for a user. A common event occurrence in at least two of
the glucose level readings is determined. The at least two glucose level
readings from the common event occurrence onwards in time for a time
period is analyzed. A glucose level pattern formed by the at least two
glucose level readings having a similar shape is determined. At least one
anomalous glucose level reading having the similar shape and not
conforming to the glucose level pattern is analyzed. The at least one
anomalous glucose level reading is adapted to the pattern to form an
adapted glucose level pattern. An insulin dosage for the time period
beginning at the common event occurrence is calculated based on the
adapted glucose level pattern.