Description Usage Arguments Value Examples
A function creating parameters with abrupt changes and sequential data generated by those parameters in Gaussian form.
1 | datagenNoml(T, k, a, b, sig = 1)
|
T |
Index of time series data. |
k |
Number of abrupt changes |
a |
Parameter space, upper bound. |
b |
Parameter space, lower bound. |
sig |
Variance of normal distribution with 1 as default. |
Return 'theta_true' as ture underlying paramaeters and 'Y' as data sequence.
1 2 3 4 5 6 7 8 9 | data=datagenNoml(T=1000,k=6,a=-10,b=10,sig=1)
y=data[[1]]
theta_t=data[[2]]
plot(data.frame(x=1:T,y=y),type='l',col='lightblue',
ylim=c(-10,10),ylab='Generate Data/True mean',xlab='time index')
par(new=TRUE)
plot(data.frame(x=1:T,y=theta_t),type='l',
col='red',ylim=c(-10,10),ylab='',xlab='',axes=F)
title(main="Normal Data Sequence")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.