stan-dev / docs

Documentation for the Stan language and CmdStan
https://mc-stan.org/docs/
Other
37 stars 107 forks source link

Update documentation for "Missing Data: Sliced missing" data to new array syntax #763

Closed maxdrohde closed 4 months ago

maxdrohde commented 4 months ago

In the documentation on Missing Data (https://mc-stan.org/docs/stan-users-guide/missing-data.html) I think the code under the heading "Sliced missing data" should be updated for the new Stan array syntax.

Below is what I think it should be:

Current

data {
  int<lower=0> N_obs;
  int<lower=0> N_mis;
  int<lower=1, upper=N_obs + N_mis> ii_obs[N_obs];
  int<lower=1, upper=N_obs + N_mis> ii_mis[N_mis];
  array[N_obs] real y_obs;
}

Suggested

data {
  int<lower=0> N_obs;
  int<lower=0> N_mis;
  array[N_obs] int<lower=1, upper=N_obs + N_mis> ii_obs;
  array[N_mis] int<lower=1, upper=N_obs + N_mis> ii_mis;
  array[N_obs] real y_obs;
}
mitzimorris commented 4 months ago

thanks - fixed!