simulateGaps | R Documentation |
Function to simulate the MCAR gappy data for a list of complete original time series according to various combinations of gap structure parameters *p* and *g*. and store in a list.
simulateGaps(OriginalData, p, g, K)
OriginalData |
|
p |
|
g |
|
K |
|
# Subroutine removes p*n points where the number of consecutive missing
# observations (gaps) is a multiple of gap_width. For example, in a time
# series of length n = 100:
p = 0.30, g = 2
# will generate 30 missing points, with <15 holes.
# Usage in simulateGaps():
p = c(0.05,0.10,0.15,0.20)
g = c(1,5,10)
K = 10 # number of gappy series to simulate under each p,g specification
GappyData <- simulateGaps(OriginalData = OriginalData, p = p, g = g, K = K)
# dimension (d, p, g, k)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.