In reply to laura.

Use the trapezoid rule applied to the nonmissing data, which is equivalent to linear interpolation of missing Y values.