cholesky_factor_corr

42 views
Skip to first unread message

Vishv Jeet

unread,
Jan 27, 2017, 4:20:29 PM1/27/17
to Stan users mailing list

Is there a way to constrain parameters in cholesky_factor_corr to have only positive values?

regards,
vishy

Ben Goodrich

unread,
Jan 27, 2017, 5:01:44 PM1/27/17
to Stan users mailing list
On Friday, January 27, 2017 at 4:20:29 PM UTC-5, Vishv Jeet wrote:

Is there a way to constrain parameters in cholesky_factor_corr to have only positive values?

No. You probably want a kernel function for that.

Ben

Bob Carpenter

unread,
Jan 27, 2017, 5:09:09 PM1/27/17
to stan-...@googlegroups.com
Do you want the correlations to be positive or the
cholesky factor to be only positive? The latter can
be done with transforms and a Jacobian following the
way we do the Cholesky factor itself. The former would
be easy for a 2 x 2 correlation matrix, but I don't know
how to do it for anything larger.

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Vishv Jeet

unread,
Jan 28, 2017, 7:55:19 AM1/28/17
to Stan users mailing list
Thank you. I want the correlations to be all positive, I did'nt realize that keeping cholesky factor positive is an overkill. I will work out the Jacobian.

Do you want the correlations to be positive or the
cholesky factor to be only positive? 

Ben Goodrich

unread,
Jan 28, 2017, 9:13:21 AM1/28/17
to Stan users mailing list
On Saturday, January 28, 2017 at 7:55:19 AM UTC-5, Vishv Jeet wrote:
Thank you. I want the correlations to be all positive, I did'nt realize that keeping cholesky factor positive is an overkill. I will work out the Jacobian.

Yes, this is the difficulty. There are correlation matrices with all positive correlations for which the lower-triangular elements of the Cholesky factor have mixed signs. And Cholesky factors with all positive lower-triangular elements when multiplied together only cover a subset of the correlation matrices with all positive correlations.

Ben

Michael Betancourt

unread,
Jan 28, 2017, 9:13:27 AM1/28/17
to stan-...@googlegroups.com
A Gaussian with positive correlations is exchangeable, and
as the dimensions increase it will asymptote to a hierarchical
model.  So you probably just want to just build a hierarchical 
model explicitly.
Reply all
Reply to author
Forward
0 new messages