> On Sep 15, 2016, at 2:27 PM, Shantanu K. Karve <
shantan...@gmail.com> wrote:
>
> returning to this - the thing about a Auto regressive model of some type i.e.
>
> y(i) = f( y(i-1), y(i-2)... )
> where f is some linear function, is that there's nothing about regressors in there - it just says that my target/predicted variable depends on past values of itself..
>
> I have regressors/ predictors so my equation is :
> y(i) = f( g(x(i), x (i-1), x(i-2 )... ) etc.. there's multiple predictors - advertising in print, radio, tv, digital etc.
>
> In this domain its called Adstock and saturation. The g function includes both a decay ( x'(i) = x(i) + lamba * x'(-1) ) and a saturation function which can be a power of less than 1 or a neg-exponential or logistic... Not sure if using such "moving average" of the predictors breaks any assumptions in stan..
The only assumptions we make are
1. that the program defines a proper density up to
an additive constant (i.e., the exp() of the log density
has a finite integral), and
2. the density is continuously differentiable.
Stan can run into sampling problems with too-fat tails, too-thin tails, or
extreme position-dependent curvature in the posterior.
Time series can have strong dependencies among the parameters,
which can sometimes be tackled by reparameterizing.
E.g., rather than
theta[t+1] ~ normal(theta[t], sigma);
you can use a non-centered parameterization with a parameter
theta_raw and transformed parameter theta, with
theta[t + 1] = theta[t] + sigma * theta_raw[t+1];
theta_raw[t + 1] ~ normal(0, 1);
The sampling will happen over the theta_raw, but you'll still
recover your theta.
- Bob