Check whether cmdstanr
is available and prints version and logistic example.
Value
check_cmdstanr()
prints results from checks.
check_cmdstan()
returns TRUE
if CmdStan
seems to be installed, otherwise FALSE
Examples
check_cmdstanr()
#> cmdstanr is installed.
#> cmdstanr version:
#> 0.8.1.9000
#> cmdstan version:
#> 2.35.0
#> Example program:
#> data {
#> int<lower=0> N;
#> int<lower=0> K;
#> array[N] int<lower=0, upper=1> y;
#> matrix[N, K] X;
#> }
#> parameters {
#> real alpha;
#> vector[K] beta;
#> }
#> model {
#> target += normal_lpdf(alpha | 0, 1);
#> target += normal_lpdf(beta | 0, 1);
#> target += bernoulli_logit_glm_lpmf(y | X, alpha, beta);
#> }
#> generated quantities {
#> vector[N] log_lik;
#> for (n in 1 : N) {
#> log_lik[n] = bernoulli_logit_lpmf(y[n] | alpha + X[n] * beta);
#> }
#> }