sim_kraus | R Documentation |
Partially observed functional data is generated with 51 regular grids by using the setting of Kraus(2015).
sim_kraus(
n = 100,
type = c("partial", "snippet", "dense"),
num.comp = 100,
out.prop = 0.2,
out.type = 1,
dist = "normal",
noise = 0,
d = 1.4,
f = 0.2
)
n |
a number of curves |
type |
the type of generated data. "partial" means the option for partially observed data, "snippet" is short fragmented data, and "dense" means the fully observed curves. |
num.comp |
the number of components when the data are generated. See Kraus(2015). |
out.prop |
a proportion of outlying curves of total n curves. Only used for dist = "normal". |
out.type |
a outlier type, 1~3 are supported. Only used for dist = "normal". |
dist |
a distribution which the data is generated. "normal"(Normal distribution) and "tdist"(t-distribution) are supported. If dist = "tdist", the option of |
noise |
a numeric value which is added random gaussian noises. Default is 0(No random noise). |
d |
a parameter for missingness when |
f |
a parameter for missingness when |
a list contatining as follows:
Ly |
a list of n vectors containing the observed values for each individual. |
Lt |
a list of n vectors containing the observation time points for each individual corresponding to |
out.ind |
a vector containing outlier index. 0 is non-outlier and 1 is the outlier. |
x.full |
a n x 51 dense matrix with n observations per 51 timepoints before making partially observed. |
Kraus, D. (2015). Components and completion of partially observed functional data. Journal of the Royal Statistical Society: Series B: Statistical Methodology, 777-801.
set.seed(100)
x.list <- sim_kraus(n = 100,
type = "partial",
num.comp = 5,
out.prop = 0.2,
dist = "normal")
x <- list2matrix(x.list)
matplot(t(x), type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.