Skip to content

Another MCMCglmm question - fixing correlations

2 messages · Malcolm Fairbrother, Jarrod Hadfield

#
Dear Jarrod,

A while back we had a discussion on the list about spatial simultaneous autoregressive lag models, using the "sir" function in MCMCglmm. I just tried re-running the code in my message of 5 Dec 2010, which was working at the time, and it now gets hung up on the call to "sir", returning the error:

Error in model.frame.default(object, data, xlev = xlev) : 
  invalid type (S4) for variable 'sir(~W, ~units)'

I thought "sir(~W, ~diag(nrow(W)))" might help, but it doesn't.

And I get the same error if I try the code from pp. 132-3 in the MCMCglmm CourseNotes.

Did you tweak something in MCMCglmm (I'm now running version 2.16) which might have caused this problem? Any assistance appreciated.

Cheers,
Malcolm
On 5 Dec 2010, at 16:16, Malcolm Fairbrother wrote:

            
4 days later
#
Hi Malcolm,

I'm aware of the problem - I moved to a sparseMatrix implementation  
which seems to be incompatible with with  
model.matrix/sparse.model.matrix. I will try and sort it out as soon  
as I have time.

Cheers,

Jarrod



Quoting Malcolm Fairbrother <m.fairbrother at bristol.ac.uk> on Tue, 21  
Aug 2012 09:05:01 +0100: