Speedfusion packet loss formula peplink API

Hi I am calculating the packet loss over each speedfusion link. From the peplink API I get the receive and transmit packets for

  • WAN
  • loss
  • fragment
  • out_of_order
  • recover
  • discard
  • fec
  • redundant

how to calculate packet loss?

  • Are the fragmented, out_of_order, recover, discard, fec and redundant packets part of the total packets or is this only the WAN packet?
  • what is the formula of the packet loss? A general formula I use is the lost packets / (WAN packets + lost packets).
    thanks