Skip to content

Issue/870 affine xform clarification #872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
326 changes: 0 additions & 326 deletions docs/quarto-config/quarto_styles.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/reference-manual/transforms.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ $$

The default value for the offset $\mu$ is $0$ and for the multiplier $\sigma$ is
$1$ in case not both are specified.

For a container variable, the affine transform is applied to each element of that variable.

### Affine inverse transform {-}

Expand Down
21 changes: 21 additions & 0 deletions src/reference-manual/types.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,27 @@ model {
}
```

For a container variable, the affine transform is applied to each element of that variable.
As an example, the non-centered parameterization of Neal's Funnel in the
[Stan User's Guide reparameterization section](https://mc-stan.org/docs/stan-users-guide/reparameterization.html),
$$
p(y,x) = \textsf{normal}(y \mid 0,3) \times \prod_{n=1}^9
\textsf{normal}(x_n \mid 0,\exp(y/2)).
$$
can be written as:

```stan
parameters {
real<multiplier=3> y;
vector<multiplier=exp(y/2)>[9] x;
}
model {
y ~ std_normal();
x ~ std_normal();
}
```
where the affine transform is applied to every element of vector `x`.

### Expressions as bounds and offset/multiplier {-}

Bounds (and offset and multiplier)
Expand Down
Loading