stan-dev / example-models

Example models for Stan
http://mc-stan.org/
772 stars 479 forks source link

Fix some notation and formatting. #128

Closed mkcor closed 6 years ago

mkcor commented 6 years ago

Hi @mitzimorris!

Hope this finds you well.

I'm not entirely sure of my changes, which is why I checked "Allow edits from maintainers."

I understand that there are $n$ regions and we identify a region by $i$ (and, say, another region by $j$). So $i$ runs from $1, ..., n$.

But, apparently, there are also "$n$ different areal units of a region" (in a region? in each region?); then I would understand $n_i$ to be an areal unit of region $i$.

Does $n_i = 1, ..., n$? It would seem odd that this would be the same $n$ (number of regions vs. number of areal units per region).

Am I completely off? Please let me know!

I've also noticed that, starting at section "Adding an ICAR component to a Stan model," $n$ (which one?) seems to become $N$ while, earlier on, $N$ is used to denote the normal distribution.

Thank you, Marianne

mitzimorris commented 6 years ago

Marianne,

many thanks for the careful reading - approved and merged your changes. are you using this model or planning on using it?

my talk at the Ann Arbor R Users group went OK. it was a learning experience all around, and I've got a long way to go w/r/t case study, talk, and further work.

cheers, Mitzi

Hi @mitzimorris!

Hope this finds you well.

I'm not entirely sure of my changes, which is why I checked "Allow edits from maintainers."

I understand that there are $n$ regions and we identify a region by $i$ (and, say, another region by $j$). So $i$ runs from $1, ..., n$.

But, apparently, there are also "$n$ different areal units of a region" (in a region? in each region?); then I would understand $n_i$ to be an areal unit of region $i$.

Does $n_i = 1, ..., n$? It would seem odd that this would be the same $n$ (number of regions vs. number of areal units per region).

Am I completely off? Please let me know!

I've also noticed that, starting at section "Adding an ICAR component to a Stan model," $n$ (which one?) seems to become $N$ while, earlier on, $N$ is used to denote the normal distribution.

Thank you, Marianne You can view, comment on, or merge this pull request online at:

https://github.com/stan-dev/example-models/pull/128

-- Commit Summary --

  • Fix some notation and formatting.

-- File Changes --

M knitr/car-iar-poisson/icar_stan.Rmd (6)

-- Patch Links --

https://github.com/stan-dev/example-models/pull/128.patch https://github.com/stan-dev/example-models/pull/128.diff

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/stan-dev/example-models/pull/128

mkcor commented 6 years ago

Hi @mitzimorris,

Thanks for sharing!

One of @bayesways's and my projects (when we find the time...) is to translate this case study into Python (https://github.com/bayesways/spatial_stan), so that we can learn along the way and (maybe? hopefully?) contribute something useful to the community.

Cheers, Marianne