# Transform sigma values (log) to original scale

**URL:** <https://discourse.mc-stan.org/t/transform-sigma-values-log-to-original-scale/38811>\
**Category:** General\
**Tags:** covariance, brms\
**Created:** [February 17, 2025, 5:55pm UTC](https://discourse.mc-stan.org/t/transform-sigma-values-log-to-original-scale/38811 "2025-02-17T17:55:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federico\_Garrido](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/federico_garrido/32/20044_2.png) [@Federico\_Garrido](https://discourse.mc-stan.org/u/Federico_Garrido)\
**Post date:** [February 17, 2025, 5:55pm UTC](https://discourse.mc-stan.org/t/transform-sigma-values-log-to-original-scale/38811/1 "2025-02-17T17:55:30Z")

</div>

How can I transform the variance (sigma) values in log scale to the original scale in DHGLM models? Specifically in my model: sigma\_d13C\_Intercept and sigma\_d15N\_Intercept?

Formula: d13C ~ Sexo \* foraging + (1 | a | ID)  
sigma ~ Sexo \* foraging + (1 | a | ID)  
d15N ~ Sexo \* foraging + (1 | a | ID)  
sigma ~ Sexo \* foraging + (1 | a | ID)

Regression Coefficients:  
Estimate Est.Error l-95% CI u-95% CI Rhat  
d13C\_Intercept -15.33 0.10 -15.52 -15.14 1.00  
sigma\_d13C\_Intercept -0.89 0.08 -1.05 -0.73 1.00  
d15N\_Intercept 17.61 0.26 17.11 18.11 1.00  
sigma\_d15N\_Intercept -0.07 0.10 -0.25 0.13 1.00

---

<div class="post-metadata">

**Author:** ![Solomon](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/solomon/32/2495_2.png) [@Solomon](https://discourse.mc-stan.org/u/Solomon)\
**Post date:** [February 19, 2025, 3:04pm UTC](https://discourse.mc-stan.org/t/transform-sigma-values-log-to-original-scale/38811/2 "2025-02-19T15:04:26Z")

</div>

Say you’ve named your model fit object `my_model`. Pull the posterior daws with `as_draws_df()`, and transform the vectors of your choosing within `mutate()`. To get your \sigma posteriors out of the log scale, you exponentiate with `exp()`.

```no-highlight
as_draws_df(my_model) |> 
  dplyr::mutate(sigma_scale = exp(sigma_d13C_Intercept))

```
