# NOT RUN {
### Simulate underreported time series data
x <- arima.sim(model=list(ar=0.4), n=50)
ind <- rbinom(50, 1, 0.6)
y <- ifelse(ind==0, x, x*0.3)
pr <- fitMisRepARMA(y, 1e-8, 5, 0.05, 1, 0, covars=NULL, misReport="U")
x <- reconstruct(pr)
# }
Run the code above in your browser using DataLab