Skip to content

Commit 41c7dd0

Browse files
committed
edits suggested by Anna Riha
1 parent 470ad7b commit 41c7dd0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/reference-manual/statements.qmd

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ sigma ~ normal(0, 1);
383383
```
384384
The symbol $\sim$ is called tilde. Due to historical reasons, the
385385
distribution statements used to be called "sampling statements" in
386-
Stan, but that term is not recommended anymore as it is less accurate
386+
Stan, but that term is not recommended anymore as it is a less accurate
387387
description.
388388

389389
In general, we can read $\sim$ as "is distributed as," and overall
@@ -420,7 +420,7 @@ density. You can think of each line as representing an additional
420420
piece of information.
421421

422422
When the joint distribution is considered as a function of parameters
423-
(e.g. $\mu$, $\sigma$) given fixed data, it is proportional to
423+
(e.g. $\mu$, $\sigma$) given fixed data, it is proportional to the
424424
posterior distribution. In general, the posterior distribution is not
425425
a normalized probability density function---that is, it will be
426426
positive but will not in general integrate to 1---but the
@@ -432,11 +432,11 @@ terms in the model block. Equivalently, each $\sim$ statement
432432
corresponds to a multiplicative factor in the unnormalized posterior
433433
density.
434434

435-
Distribution statement `... ~ ...` accepts only distributions on the
436-
right side. These distributions can be built in or user defined
437-
distributions. The left side of a distribution statement may be data,
435+
Distribution statements (`~`) accept only built-in or user-defined
436+
distributions on the
437+
right side. The left side of a distribution statement may be data,
438438
parameter, or a complex expression, but the evaluated type needs to
439-
match one of the allowed type of the right hand side distribution (see
439+
match one of the allowed types of the distribution on the right (see
440440
more below).
441441

442442
In Stan, a distribution statement is merely a notational convenience
@@ -452,13 +452,13 @@ target += normal_lpdf(sigma | 0, 1);
452452
```
453453

454454
Stan models can mix distribution statements and log probability
455-
increment statements. Although in the literature statistical models
456-
are usually defined with distributions, there are several cases due to
457-
computational efficiency (e.g. censored data model) or coding language
458-
limitations (e.g. mixture models in Stan), that we may want to code
459-
the log likelihood or parts of it directly, which is possible with log
460-
probability increment statements. See the discussion below about
461-
Jacobians.
455+
increment statements. Although statistical models
456+
are usually defined with distributions in the literature,
457+
there are several scenarios in which we may want to code the log
458+
likelihood or parts of it directly, for example, due to computational
459+
efficiency (e.g. censored data model) or coding language limitations
460+
(e.g. mixture models in Stan). This is possible with log probability
461+
increment statements. See also the discussion below about Jacobians.
462462

463463
In general, a distribution statement of the form
464464

0 commit comments

Comments
 (0)