{"action":"opened","issue":{"url":"https://api.github.com/repos/stan-dev/pystan/issues/191","labels_url":"https://api.github.com/repos/stan-dev/pystan/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/pystan/issues/191/comments","events_url":"https://api.github.com/repos/stan-dev/pystan/issues/191/events","html_url":"https://github.com/stan-dev/pystan/issues/191","id":115939315,"number":191,"title":"`assert` in `_chains.effective_sample_size` triggers on constant parameters  ","user":{"login":"stephen-hoover","id":8355977,"avatar_url":"https://avatars.githubusercontent.com/u/8355977?v=3","gravatar_id":"","url":"https://api.github.com/users/stephen-hoover","html_url":"https://github.com/stephen-hoover","followers_url":"https://api.github.com/users/stephen-hoover/followers","following_url":"https://api.github.com/users/stephen-hoover/following{/other_user}","gists_url":"https://api.github.com/users/stephen-hoover/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-hoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-hoover/subscriptions","organizations_url":"https://api.github.com/users/stephen-hoover/orgs","repos_url":"https://api.github.com/users/stephen-hoover/repos","events_url":"https://api.github.com/users/stephen-hoover/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-hoover/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-09T18:46:18Z","updated_at":"2015-11-09T18:46:18Z","closed_at":null,"body":"I'm coming across instances where the `assert chain_var[chain] < float('inf'), chain_var[chain]` line in _chains.pyx triggers when I'd rather it didn't. I have a model with a transformed parameter which is the same on every step of the chain. It has standard deviation zero, and so the autocovariance is nan. This causes an `AssertionError` in `_chains.effective_sample_size`.\r\n\r\n@ariddell , I know I suggested in #186 checking that `chain_var[chain]` isn't infinity, but it seems there's cases where that should pass. For this particular case, the `Rhat` in the summary output shows up as `NaN` (if I remove the `assert`), so that makes it obvious that the effective sample size output is suspect."}}