# Simple model Parse Errors

**URL:** <https://discourse.mc-stan.org/t/simple-model-parse-errors/3249>\
**Category:** Modeling\
**Tags:** specification\
**Created:** [February 9, 2018, 9:15pm UTC](https://discourse.mc-stan.org/t/simple-model-parse-errors/3249 "2018-02-09T21:15:05Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Bob\_Carpenter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bob_carpenter/32/9230_2.png) [@Bob\_Carpenter](https://discourse.mc-stan.org/u/Bob_Carpenter)\
**Post date:** [February 11, 2018, 6:04pm UTC](https://discourse.mc-stan.org/t/simple-model-parse-errors/3249/10 "2018-02-11T18:04:17Z")

</div>

This is partly a Stan question and partly a stats question.

For Stan, you need to define any derived quantities that depend on parameters in either the transformed parameters block or as a local variable in the model block (or in generated quantities if the log density doesn’t depend on the output).

The stats problem is more subtle and is going to depend on what `f` is and other information you have in the model. Typically, you need a Jacobian adjustment when changing variables this way and trying to put a distribution on the transform. Here, you need to be able to map from `x` back to `z1` and `z2`. The manual explains how this works in the chapter on transformed parameters and also the entire chapter on how the internal transform works.

---

_[View the full topic](https://discourse.mc-stan.org/t/simple-model-parse-errors/3249)._
