@@ -190,6 +190,12 @@ cmdstan_model <- function(stan_file = NULL, exe_file = NULL, compile = TRUE, ...
190190# ' [`$save_hpp_file()`][model-method-compile] | Save the `.hpp` file containing the generated C++ code. |
191191# ' [`$expose_functions()`][model-method-expose_functions] | Expose Stan functions for use in R. |
192192# '
193+ # ' ## Diagnostics
194+ # '
195+ # ' |**Method**|**Description**|
196+ # ' |:----------|:---------------|
197+ # ' [`$diagnose()`][model-method-diagnose] | Run CmdStan's `"diagnose"` method to test gradients, return [`CmdStanDiagnose`] object. |
198+ # '
193199# ' ## Model fitting
194200# '
195201# ' |**Method**|**Description**|
@@ -800,7 +806,7 @@ CmdStanModel$set("public", name = "variables", value = variables)
800806# ' file <- write_stan_file("
801807# ' data {
802808# ' int N;
803- # ' int y [N];
809+ # ' array [N] int y ;
804810# ' }
805811# ' parameters {
806812# ' // should have <lower=0> but omitting to demonstrate pedantic mode
@@ -926,7 +932,7 @@ CmdStanModel$set("public", name = "check_syntax", value = check_syntax)
926932# ' file <- write_stan_file("
927933# ' data {
928934# ' int N;
929- # ' int y [N];
935+ # ' array [N] int y ;
930936# ' }
931937# ' parameters {
932938# ' real lambda;
@@ -1653,7 +1659,7 @@ CmdStanModel$set("public", name = "variational", value = variational)
16531659# ' mcmc_program <- write_stan_file(
16541660# ' "data {
16551661# ' int<lower=0> N;
1656- # ' int<lower=0,upper=1> y[N] ;
1662+ # ' array[N] int<lower=0,upper=1> y;
16571663# ' }
16581664# ' parameters {
16591665# ' real<lower=0,upper=1> theta;
@@ -1672,13 +1678,13 @@ CmdStanModel$set("public", name = "variational", value = variational)
16721678# ' gq_program <- write_stan_file(
16731679# ' "data {
16741680# ' int<lower=0> N;
1675- # ' int<lower=0,upper=1> y[N] ;
1681+ # ' array[N] int<lower=0,upper=1> y;
16761682# ' }
16771683# ' parameters {
16781684# ' real<lower=0,upper=1> theta;
16791685# ' }
16801686# ' generated quantities {
1681- # ' int y_rep [N] = bernoulli_rng(rep_vector(theta, N));
1687+ # ' array [N] int y_rep = bernoulli_rng(rep_vector(theta, N));
16821688# ' }"
16831689# ' )
16841690# '
0 commit comments