# Regression of proportions

**URL:** https://discourse.mc-stan.org/t/regression-of-proportions/2375
**Category:** Modeling
**Created:** [October 30, 2017, 6:46am UTC](https://discourse.mc-stan.org/t/regression-of-proportions/2375 "2017-10-30T06:46:45Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![stemangiola](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/stemangiola/32/260_2.png) [@stemangiola](https://discourse.mc-stan.org/u/stemangiola)
#### Post date: [November 3, 2017, 12:13am UTC](https://discourse.mc-stan.org/t/regression-of-proportions/2375/5 "2017-11-03T00:13:14Z")

</div>

Thanks,

I am using beta regression, inspired by your message

```
data { 
	int P;
  int<lower=1> S; 
	int R;
  matrix<lower=0,upper=1>[P,S] y; 
  matrix[S,R] x; 
} 
parameters { 
  real<lower=0> phi; 
  matrix[P,R] alpha; 
} 
model { 

    matrix[P,S] mu; 
    mu = inv_logit( alpha * x'); 
    to_vector(y) ~ beta(to_vector(mu) * phi, (1 - to_vector(mu)) * phi); 

} 

```

Indeed it fails to converge for components of the multiple correlation with little slope

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/mc_stan/original/2X/5/5762379b7fe39b92d798f6d095ab0bc9790d98e7.jpg)

And it converge if I force the phi (error) parameter bigger than a threshold, then all the proportion predictions are kind of squeezed around the convergence function

---

_[View the full topic](https://discourse.mc-stan.org/t/regression-of-proportions/2375)._
