Modeling help - estimating relative likelihood of different time series models

71 views
Skip to first unread message

andy...@cubist-asia.com

unread,
Aug 13, 2015, 12:26:11 AM8/13/15
to Stan users mailing list
Hi all,

I have a set of time series values (positive) of y:

vector<lower=0>[N] y

I want to estimate the relative likelihood of the following 3 scenarios:

a. diverging AR(1):     y_n ~ normal (alpha + y_(n-1), sigma), alpha > 0
b. converging AR(1):  y_n ~ normal (alpha + y_(n-1), sigma), alpha < 0
c. stationary:             y_n ~ normal (mu, sigma)

What would be the best way to do this in STAN?

Many thanks,
Andy

Daniel Lee

unread,
Aug 13, 2015, 7:21:17 AM8/13/15
to stan-...@googlegroups.com
Write 3 Stan programs? That's what I would do and use the loo package. 
--
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.
For more options, visit https://groups.google.com/d/optout.

Michael Betancourt

unread,
Aug 13, 2015, 10:55:51 AM8/13/15
to stan-...@googlegroups.com
To discriminate between (a) and (b) you can just
run a model with alpha unconstrained and consider

p(alpha > 0) = n(alpha > 0) / n.

The alpha=0 case is tricker because it has zero
measure compared to the others and you need
to do proper model comparison.  Cross validation,
as approximated by the loo package, would be
one such approach.

Daniel Lakeland

unread,
Aug 20, 2015, 11:56:27 AM8/20/15
to Stan users mailing list
You might think about defining what it means for alpha to have no practical significance for your timeseries. Like for example if abs(alpha) < SomeValue

For example if you are observing for a year and the cumulative effect of alpha over a year is less than the measurement error in one observation, or something like that.

Also, I think there's something amiss with your model. y is positive, but if y_0 is small enough and alpha is negative, then the average value of the next step is negative!

Seth Flaxman

unread,
Aug 20, 2015, 1:00:30 PM8/20/15
to stan-...@googlegroups.com
hmm, maybe I'm missing something but don't you need an autoregressive parameter beta, e.g.:

y_n ~ normal (alpha + beta * y_(n-1), sigma)

In which case, couldn't you just fit one model, and see whether alpha > 0 or < 0 and whether beta is "significant"?

Seth

andy...@cubist-asia.com

unread,
Aug 24, 2015, 10:42:36 AM8/24/15
to Stan users mailing list
Michael, many thanks. Will take a look at loo.



On Thursday, August 13, 2015 at 10:55:51 PM UTC+8, Michael Betancourt wrote:
To discriminate between (a) and (b) you can just
run a model with alpha unconstrained and consider

p(alpha > 0) = n(alpha > 0) / n.

The alpha=0 case is tricker because it has zero
measure compared to the others and you need
to do proper model comparison.  Cross validation,
as approximated by the loo package, would be
one such approach.
On Aug 13, 2015, at 4:21 AM, Daniel Lee <bea...@alum.mit.edu> wrote:

Write 3 Stan programs? That's what I would do and use the loo package. 

On Thursday, August 13, 2015, <andy...@cubist-asia.com> wrote:
Hi all,

I have a set of time series values (positive) of y:

vector<lower=0>[N] y

I want to estimate the relative likelihood of the following 3 scenarios:

a. diverging AR(1):     y_n ~ normal (alpha + y_(n-1), sigma), alpha > 0
b. converging AR(1):  y_n ~ normal (alpha + y_(n-1), sigma), alpha < 0
c. stationary:             y_n ~ normal (mu, sigma)

What would be the best way to do this in STAN?

Many thanks,
Andy

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

andy...@cubist-asia.com

unread,
Aug 24, 2015, 10:48:16 AM8/24/15
to Stan users mailing list
Hi Daniel,

My goal is to avoid some hard limit/cut-off set-up because, a priori, I don’t know what these limits are.

re -ve next step: thanks for the heads-up, let me take a look at the data again and see if this could happen or not

Andy
Reply all
Reply to author
Forward
0 new messages