Dear Cindy,
Have you seen the example in section 6.1 of the User Manual? If so, can you say more about what is unclear? To provide missing data, set data values to be NA. A variable can contain some observed and some missing data, so it is not necessary to divide the data. In many such cases, it will help to provide initial values for those nodes in the inits argument to nimbleModel. Otherwise initial values will be drawn from each node's prior distribution, which may or may not provide a good starting place for an MCMC. For values in the same variable that are not missing, you can put NA in the inits. For example:
y <- c(1, NA, 5) ## 1st and third values are observed, second value is missing
y.inits <- c(NA, 7, NA) ## provide an initial value for what is missing
Set the data to be y (either in nimbleModel or a subsequent call to the setData method of your model) and include y = y.inits in the list provided as the inits argument to nimbleModel.
Please let us know further questions.
Perry