oldPar <- par(no.readonly = TRUE)
# split
split <- simMultiFunData(type = "split", argvals = list(seq(0,1,0.01), seq(-0.5,0.5,0.02)),
M = 5, eFunType = "Poly", eValType = "linear", N = 7)
par(mfrow = c(1,2))
plot(split$trueFuns, main = "Split: True Eigenfunctions", ylim = c(-2,2))
plot(split$simData, main = "Split: Simulated Data")
# weighted (one-dimensional domains)
weighted1D <- simMultiFunData(type = "weighted",
argvals = list(list(seq(0,1,0.01)), list(seq(-0.5,0.5,0.02))),
M = c(5,5), eFunType = c("Poly", "Fourier"), eValType = "linear", N = 7)
plot(weighted1D$trueFuns, main = "Weighted (1D): True Eigenfunctions", ylim = c(-2,2))
plot(weighted1D$simData, main = "Weighted (1D): Simulated Data")
# weighted (one- and two-dimensional domains)
weighted <- simMultiFunData(type = "weighted",
argvals = list(list(seq(0,1,0.01), seq(0,10,0.1)), list(seq(-0.5,0.5,0.01))),
M = list(c(5,4), 20), eFunType = list(c("Poly", "Fourier"), "Wiener"),
eValType = "linear", N = 7)
plot(weighted$trueFuns, main = "Weighted: True Eigenfunctions (m = 2)", obs = 2)
plot(weighted$trueFuns, main = "Weighted: True Eigenfunctions (m = 15)", obs = 15)
plot(weighted$simData, main = "Weighted: Simulated Data (1st observation)", obs = 1)
plot(weighted$simData, main = "Weighted: Simulated Data (2nd observation)", obs = 2)
par(oldPar)
Run the code above in your browser using DataLab