stan-dev/example-models

`stan_demo` example 500 not working

Open

#144 aperta il 30 nov 2018

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)HTML (480 fork)batch import
bughelp wanted

Metriche repository

Star
 (739 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hi Ben,

I tried the 500th example of stan_demo, but it seems not to be working. I ran the code from RStudio cloud. Here are my codes:

library(RStan)
stan_demo()
500

Here are the console log:

> K <- 8

> D <- 4

> N <- 500

> y <- 
>+ structure(c(1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0,
>+ 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0,  .... [TRUNCATED] 

> x <- 
+ structure(c(-0.56947710721168, 0.0686981186395276, 0.807151998639757,
+ 0.311832939914023, 0.670993954113173, -0.914759441112067, -0.1375718 .... [TRUNCATED] 


SAMPLING FOR MODEL 'probit-multi-good' NOW (CHAIN 1).
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.
Rejecting initial value:
  Error evaluating the log probability at the initial value.
Exception: Phi: x is nan, but must not be nan!  (in 'model4f66680104f2_probit_multi_good' at line 26)

Rejecting initial value:
  Log probability evaluates to log(0), i.e. negative infinity.
  Stan can't start sampling from this initial value.

Initialization between (-2, 2) failed after 100 attempts. 
 Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model.
[1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization failed."
error occurred during calling the sampler; sampling not done

Guida contributor