All,
I am working on large multilevel model in which I have a variance-covariance matrix, SigmaTheta[k], to be estimated in each cluster; if necessary I can come up with a mimimum working example to post, but basically:
I specify weak priors on Sigma[k] using:
SigmaTheta[k] <- diag_matrix(sdTheta[k]) * RhoTheta[k] * diag_matrix(sdTheta[k]);
Then I run a cholesky decomposition:
L[k]<- cholesky_decompose( SigmaTheta[k] );
Theta[i] <- muStateTheta[Cluster[i]] + L[Cluster[i]] * ATheta[i];
I get the following error:
Error in call to cholesky decomposition; require symmetric matrix, but found; x[0,5]=-8.69387:0; x[5,0]=-8.69387:0
error occurred during calling the sampler; sampling not done
On the second run I get:
x[0,2]=0.0800156:0; x[2,0]=0.0800156:0
These outputs look symmetric to me... Is there a way to adjust the sensitively of the mechanism which checks the parameter declarations?
Running in Rstan,
R version 3.0.0 (2013-04-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] rstan_1.3.0 inline_0.3.11 Rcpp_0.10.3
loaded via a namespace (and not attached):
[1] codetools_0.2-8 tools_3.0.0
>