{"action":"created","comment":{"url":"https://api.github.com/repos/stan-ja/stan-ja/pulls/comments/55130335","id":55130335,"diff_hunk":"@@ -0,0 +1,170 @@\n+## 9. 切断あるいは打ち切りデータ\n+\n+測定値に切断や打ち切りがあるデータは、Stanでは以下のそれぞれの確率モデルのようにコーディングできます。\n+\n+### 9.1. 切断分布\n+\n+Stanで切断を使える分布は、1変量分布で、対応する対数累積分布関数(cumulative distribution function: CDF)と対数相補累積分布関数(complementary cumulative distribution function: ccdf)があるものに限られています。切断分布とcdf、ccdfについてもっと知るには、26.3節の切断分布の項を参照してください。\n+\n+### 9.2. 切断データ\n+\n+切断データとは、ある下限より上か、上限より下か、あるいは上下限の間にある測定値しか報告されないようなデータです。\n+\n+切断データはStanでは切断分布を使ってモデリングできるでしょう。例えば、切断データ$y_{n}$は、$y_{n}<300$となるように切断点$U=300$が上限となっているとします。Stanではこのデータは、観測値が切断正規分布に従うとして以下のようにモデリングできます。\n+\n+```\n+data {\n+  int<lower=0> N;\n+  real U;\n+  real<upper=U> y[N];\n+}\n+parameters {\n+  real mu;\n+  real<lower=0> sigma;\n+}\n+model {\n+  for (n in 1:N)\n+    y[n] ~ normal(mu,sigma) T[,U];\n+}\n+```\n+\n+このモデルでは、上限`U`をデータとして宣言し、この制約にあてはまるように`y`のデータに制約をつけています。これは、サンプリングが始まる前、データがモデルに読み込まれたときにチェックされます。\n+\n+このモデルは、スケールと位置のパラメータに暗黙の平坦事前分布を使っています。これらには、サンプリング文を使ってモデル中で事前分布を与えることもできます。","path":"part02/chap09/chap09.md","position":33,"original_position":33,"commit_id":"31faef595272201141eb3005172bb2c673169ab0","original_commit_id":"31faef595272201141eb3005172bb2c673169ab0","user":{"login":"MatsuuraKentaro","id":11885625,"avatar_url":"https://avatars.githubusercontent.com/u/11885625?v=3","gravatar_id":"","url":"https://api.github.com/users/MatsuuraKentaro","html_url":"https://github.com/MatsuuraKentaro","followers_url":"https://api.github.com/users/MatsuuraKentaro/followers","following_url":"https://api.github.com/users/MatsuuraKentaro/following{/other_user}","gists_url":"https://api.github.com/users/MatsuuraKentaro/gists{/gist_id}","starred_url":"https://api.github.com/users/MatsuuraKentaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatsuuraKentaro/subscriptions","organizations_url":"https://api.github.com/users/MatsuuraKentaro/orgs","repos_url":"https://api.github.com/users/MatsuuraKentaro/repos","events_url":"https://api.github.com/users/MatsuuraKentaro/events{/privacy}","received_events_url":"https://api.github.com/users/MatsuuraKentaro/received_events","type":"User","site_admin":false},"body":"* 暗黙の平坦事前分布→暗黙に非正則平坦事前分布\r\n* sampling statementsとは`~`を使った書き方を指します。「サンプリング文」よりも「`~`を使って」と訳すか、「sampling statementを使って」と訳さないほうがいいかなと個人的には思いますが、どう思いますか？お任せします。\r\n* モデル中で→`model`ブロックで　の方がわかりやすいかもしれません。","created_at":"2016-03-06T00:10:28Z","updated_at":"2016-03-06T00:10:28Z","html_url":"https://github.com/stan-ja/stan-ja/pull/30#discussion_r55130335","pull_request_url":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/stan-ja/stan-ja/pulls/comments/55130335"},"html":{"href":"https://github.com/stan-ja/stan-ja/pull/30#discussion_r55130335"},"pull_request":{"href":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30","id":60039672,"html_url":"https://github.com/stan-ja/stan-ja/pull/30","diff_url":"https://github.com/stan-ja/stan-ja/pull/30.diff","patch_url":"https://github.com/stan-ja/stan-ja/pull/30.patch","issue_url":"https://api.github.com/repos/stan-ja/stan-ja/issues/30","number":30,"state":"open","locked":false,"title":"9章を翻訳しました","user":{"login":"ito4303","id":13703977,"avatar_url":"https://avatars.githubusercontent.com/u/13703977?v=3","gravatar_id":"","url":"https://api.github.com/users/ito4303","html_url":"https://github.com/ito4303","followers_url":"https://api.github.com/users/ito4303/followers","following_url":"https://api.github.com/users/ito4303/following{/other_user}","gists_url":"https://api.github.com/users/ito4303/gists{/gist_id}","starred_url":"https://api.github.com/users/ito4303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ito4303/subscriptions","organizations_url":"https://api.github.com/users/ito4303/orgs","repos_url":"https://api.github.com/users/ito4303/repos","events_url":"https://api.github.com/users/ito4303/events{/privacy}","received_events_url":"https://api.github.com/users/ito4303/received_events","type":"User","site_admin":false},"body":"どなたかレビューをお願いいたします。","created_at":"2016-02-20T06:23:14Z","updated_at":"2016-03-06T00:10:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bacff34f0ce3fbb42f3484a2b7b6c6cf5e2c7c8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30/commits","review_comments_url":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30/comments","review_comment_url":"https://api.github.com/repos/stan-ja/stan-ja/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stan-ja/stan-ja/issues/30/comments","statuses_url":"https://api.github.com/repos/stan-ja/stan-ja/statuses/31faef595272201141eb3005172bb2c673169ab0","head":{"label":"stan-ja:create/part02/chap09","ref":"create/part02/chap09","sha":"31faef595272201141eb3005172bb2c673169ab0","user":{"login":"stan-ja","id":16357636,"avatar_url":"https://avatars.githubusercontent.com/u/16357636?v=3","gravatar_id":"","url":"https://api.github.com/users/stan-ja","html_url":"https://github.com/stan-ja","followers_url":"https://api.github.com/users/stan-ja/followers","following_url":"https://api.github.com/users/stan-ja/following{/other_user}","gists_url":"https://api.github.com/users/stan-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-ja/subscriptions","organizations_url":"https://api.github.com/users/stan-ja/orgs","repos_url":"https://api.github.com/users/stan-ja/repos","events_url":"https://api.github.com/users/stan-ja/events{/privacy}","received_events_url":"https://api.github.com/users/stan-ja/received_events","type":"Organization","site_admin":false},"repo":{"id":48265007,"name":"stan-ja","full_name":"stan-ja/stan-ja","owner":{"login":"stan-ja","id":16357636,"avatar_url":"https://avatars.githubusercontent.com/u/16357636?v=3","gravatar_id":"","url":"https://api.github.com/users/stan-ja","html_url":"https://github.com/stan-ja","followers_url":"https://api.github.com/users/stan-ja/followers","following_url":"https://api.github.com/users/stan-ja/following{/other_user}","gists_url":"https://api.github.com/users/stan-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-ja/subscriptions","organizations_url":"https://api.github.com/users/stan-ja/orgs","repos_url":"https://api.github.com/users/stan-ja/repos","events_url":"https://api.github.com/users/stan-ja/events{/privacy}","received_events_url":"https://api.github.com/users/stan-ja/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stan-ja/stan-ja","description":"","fork":false,"url":"https://api.github.com/repos/stan-ja/stan-ja","forks_url":"https://api.github.com/repos/stan-ja/stan-ja/forks","keys_url":"https://api.github.com/repos/stan-ja/stan-ja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stan-ja/stan-ja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stan-ja/stan-ja/teams","hooks_url":"https://api.github.com/repos/stan-ja/stan-ja/hooks","issue_events_url":"https://api.github.com/repos/stan-ja/stan-ja/issues/events{/number}","events_url":"https://api.github.com/repos/stan-ja/stan-ja/events","assignees_url":"https://api.github.com/repos/stan-ja/stan-ja/assignees{/user}","branches_url":"https://api.github.com/repos/stan-ja/stan-ja/branches{/branch}","tags_url":"https://api.github.com/repos/stan-ja/stan-ja/tags","blobs_url":"https://api.github.com/repos/stan-ja/stan-ja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stan-ja/stan-ja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stan-ja/stan-ja/git/refs{/sha}","trees_url":"https://api.github.com/repos/stan-ja/stan-ja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stan-ja/stan-ja/statuses/{sha}","languages_url":"https://api.github.com/repos/stan-ja/stan-ja/languages","stargazers_url":"https://api.github.com/repos/stan-ja/stan-ja/stargazers","contributors_url":"https://api.github.com/repos/stan-ja/stan-ja/contributors","subscribers_url":"https://api.github.com/repos/stan-ja/stan-ja/subscribers","subscription_url":"https://api.github.com/repos/stan-ja/stan-ja/subscription","commits_url":"https://api.github.com/repos/stan-ja/stan-ja/commits{/sha}","git_commits_url":"https://api.github.com/repos/stan-ja/stan-ja/git/commits{/sha}","comments_url":"https://api.github.com/repos/stan-ja/stan-ja/comments{/number}","issue_comment_url":"https://api.github.com/repos/stan-ja/stan-ja/issues/comments{/number}","contents_url":"https://api.github.com/repos/stan-ja/stan-ja/contents/{+path}","compare_url":"https://api.github.com/repos/stan-ja/stan-ja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stan-ja/stan-ja/merges","archive_url":"https://api.github.com/repos/stan-ja/stan-ja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stan-ja/stan-ja/downloads","issues_url":"https://api.github.com/repos/stan-ja/stan-ja/issues{/number}","pulls_url":"https://api.github.com/repos/stan-ja/stan-ja/pulls{/number}","milestones_url":"https://api.github.com/repos/stan-ja/stan-ja/milestones{/number}","notifications_url":"https://api.github.com/repos/stan-ja/stan-ja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stan-ja/stan-ja/labels{/name}","releases_url":"https://api.github.com/repos/stan-ja/stan-ja/releases{/id}","deployments_url":"https://api.github.com/repos/stan-ja/stan-ja/deployments","created_at":"2015-12-19T02:08:26Z","updated_at":"2016-02-24T06:05:55Z","pushed_at":"2016-03-05T16:09:08Z","git_url":"git://github.com/stan-ja/stan-ja.git","ssh_url":"git@github.com:stan-ja/stan-ja.git","clone_url":"https://github.com/stan-ja/stan-ja.git","svn_url":"https://github.com/stan-ja/stan-ja","homepage":null,"size":1342,"stargazers_count":9,"watchers_count":9,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":9,"default_branch":"master"}},"base":{"label":"stan-ja:master","ref":"master","sha":"937197e323e4d7e176a2479adc5211b00141ae32","user":{"login":"stan-ja","id":16357636,"avatar_url":"https://avatars.githubusercontent.com/u/16357636?v=3","gravatar_id":"","url":"https://api.github.com/users/stan-ja","html_url":"https://github.com/stan-ja","followers_url":"https://api.github.com/users/stan-ja/followers","following_url":"https://api.github.com/users/stan-ja/following{/other_user}","gists_url":"https://api.github.com/users/stan-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-ja/subscriptions","organizations_url":"https://api.github.com/users/stan-ja/orgs","repos_url":"https://api.github.com/users/stan-ja/repos","events_url":"https://api.github.com/users/stan-ja/events{/privacy}","received_events_url":"https://api.github.com/users/stan-ja/received_events","type":"Organization","site_admin":false},"repo":{"id":48265007,"name":"stan-ja","full_name":"stan-ja/stan-ja","owner":{"login":"stan-ja","id":16357636,"avatar_url":"https://avatars.githubusercontent.com/u/16357636?v=3","gravatar_id":"","url":"https://api.github.com/users/stan-ja","html_url":"https://github.com/stan-ja","followers_url":"https://api.github.com/users/stan-ja/followers","following_url":"https://api.github.com/users/stan-ja/following{/other_user}","gists_url":"https://api.github.com/users/stan-ja/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-ja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-ja/subscriptions","organizations_url":"https://api.github.com/users/stan-ja/orgs","repos_url":"https://api.github.com/users/stan-ja/repos","events_url":"https://api.github.com/users/stan-ja/events{/privacy}","received_events_url":"https://api.github.com/users/stan-ja/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stan-ja/stan-ja","description":"","fork":false,"url":"https://api.github.com/repos/stan-ja/stan-ja","forks_url":"https://api.github.com/repos/stan-ja/stan-ja/forks","keys_url":"https://api.github.com/repos/stan-ja/stan-ja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stan-ja/stan-ja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stan-ja/stan-ja/teams","hooks_url":"https://api.github.com/repos/stan-ja/stan-ja/hooks","issue_events_url":"https://api.github.com/repos/stan-ja/stan-ja/issues/events{/number}","events_url":"https://api.github.com/repos/stan-ja/stan-ja/events","assignees_url":"https://api.github.com/repos/stan-ja/stan-ja/assignees{/user}","branches_url":"https://api.github.com/repos/stan-ja/stan-ja/branches{/branch}","tags_url":"https://api.github.com/repos/stan-ja/stan-ja/tags","blobs_url":"https://api.github.com/repos/stan-ja/stan-ja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stan-ja/stan-ja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stan-ja/stan-ja/git/refs{/sha}","trees_url":"https://api.github.com/repos/stan-ja/stan-ja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stan-ja/stan-ja/statuses/{sha}","languages_url":"https://api.github.com/repos/stan-ja/stan-ja/languages","stargazers_url":"https://api.github.com/repos/stan-ja/stan-ja/stargazers","contributors_url":"https://api.github.com/repos/stan-ja/stan-ja/contributors","subscribers_url":"https://api.github.com/repos/stan-ja/stan-ja/subscribers","subscription_url":"https://api.github.com/repos/stan-ja/stan-ja/subscription","commits_url":"https://api.github.com/repos/stan-ja/stan-ja/commits{/sha}","git_commits_url":"https://api.github.com/repos/stan-ja/stan-ja/git/commits{/sha}","comments_url":"https://api.github.com/repos/stan-ja/stan-ja/comments{/number}","issue_comment_url":"https://api.github.com/repos/stan-ja/stan-ja/issues/comments{/number}","contents_url":"https://api.github.com/repos/stan-ja/stan-ja/contents/{+path}","compare_url":"https://api.github.com/repos/stan-ja/stan-ja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stan-ja/stan-ja/merges","archive_url":"https://api.github.com/repos/stan-ja/stan-ja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stan-ja/stan-ja/downloads","issues_url":"https://api.github.com/repos/stan-ja/stan-ja/issues{/number}","pulls_url":"https://api.github.com/repos/stan-ja/stan-ja/pulls{/number}","milestones_url":"https://api.github.com/repos/stan-ja/stan-ja/milestones{/number}","notifications_url":"https://api.github.com/repos/stan-ja/stan-ja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stan-ja/stan-ja/labels{/name}","releases_url":"https://api.github.com/repos/stan-ja/stan-ja/releases{/id}","deployments_url":"https://api.github.com/repos/stan-ja/stan-ja/deployments","created_at":"2015-12-19T02:08:26Z","updated_at":"2016-02-24T06:05:55Z","pushed_at":"2016-03-05T16:09:08Z","git_url":"git://github.com/stan-ja/stan-ja.git","ssh_url":"git@github.com:stan-ja/stan-ja.git","clone_url":"https://github.com/stan-ja/stan-ja.git","svn_url":"https://github.com/stan-ja/stan-ja","homepage":null,"size":1342,"stargazers_count":9,"watchers_count":9,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30"},"html":{"href":"https://github.com/stan-ja/stan-ja/pull/30"},"issue":{"href":"https://api.github.com/repos/stan-ja/stan-ja/issues/30"},"comments":{"href":"https://api.github.com/repos/stan-ja/stan-ja/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/stan-ja/stan-ja/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stan-ja/stan-ja/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/stan-ja/stan-ja/statuses/31faef595272201141eb3005172bb2c673169ab0"}}}}