Input data with NA
values for the sampled observations if plot = FALSE
, otherwise a plot showing the missing observations over the complete dataset.
The missing data if smps = 'mar'
are based on random sampling by blocks. The start location of each block is random and overlapping blocks are not counted uniquely for the required sample size given by b
. Final blocks are truncated to ensure the correct value of b
is returned. Blocks are fixed at 1 if the proportion is too small, in which case "mcar"
should be used. Block sizes are also truncated to the required sample size if the input value is too large if blckper = FALSE
. For the latter case, this is the same as setting blck = 1
and blckper = TRUE
.
For all cases, the first and last observation will never be removed to allow comparability of interpolation schemes. This is especially relevant for cases when b
is large and smps = 'mar'
is used. For example, method = na.approx
will have rmse = 0 for a dataset where the removed block includes the last n observations. This result could provide misleading information in comparing methods.