[R] Cannot evaluate subset expression for sigmainverse

R. Michael Weylandt michael.weylandt at gmail.com
Tue Jan 24 03:19:15 CET 2012


There are multiple inverse() functions in the R universe: which one
are you attempting to use? (Also, none of them seem to be in
particularly standard packages: are you sure you aren't looking for
solve()?)

Reproducible code (as well as including the error you got) would be
very helpful.

Michael

On Mon, Jan 23, 2012 at 8:30 PM, Yuanyuan Tang <cicitangyy at gmail.com> wrote:
> Hi, anybody can help me with this? can JAGS solve the inverse of a matrix
> in the 3-way array? Thank you!
>
> for(i in 1:n){
>    for(a in 1:t[i]){
>      for(b in 1:t[i]){
>        sigma[i,a,b]<-pow(rho,t[a]-t[b])
>      }
>    }
>    sigmainverse[i,,]<-inverse(sigma[i,,]) # this is where jags got error
>  }
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list