The problem may be that you're trying to give W an
all-zero row.
You want an upper bound on sigma to match your uniform
distribution (another one our more verbose warnings would
have caught). But that's probably not your issue.
Did you want upper and lower bounds on the phi?
You almost never want a 1 x N matrix in Stan --- y should
probably be a row vector.
Starting a covariance matrix here:
> C0 <- diag_matrix(rep_vector(1.0e+7, 4));
is not a good idea unless you're going to be
drawing values in the tens of millions at which point,
you probably want to think about rescaling somehow.
Also, it's almost never a good idea to use unit covariance
matrices in Stan because it winds up doing a lot of expensive
and unnecessary matrix algebra. But then we don't have
a specialized unit-diagonal form of that density.
- Bob
>> Priors for (ϕ1ϕ2) are N(0,(2/3)^2) and N(0,(1/3)^2) and the inverses of variances are assumed to be independent with Gamma priors g(a2/b,a/b) where a = 1 and b =1000.
>> I found some discussions here before on constraining parameters to be stationary, so that part has been partially resolved.
>> However, the estimation fails because "error occurred during calling the sampler; sampling not done" after a ton of messages that complain "Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: validate transformed params: W is not positive definite".
>>
>> I'm a beginner in Stan and I'm certain that I've messed up somewhere in the code. Any help is appreciated!
>>
>> Thanks,
>> Peyman
>>
>> --
>> 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.
>>
>>
>> --
>> 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.
>
>
> --
> 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.
> <gdp5004.dat><linear_trend_ar2_model.stan><linear_trend_ar2_model_for_stan.r>