Greetings,
 
In a simulation I'm running, I would like to create a series of listw weight matrices outside of the simulation loop.  The appropriate inverse distance weights matrix I want to use is determined within the simulation loop using the sp.correlogram function.  For instance there are 5 possible different weight matrices, mat1..mat5.  Each of these matrices takes a little while to create, and with 1000 replications it takes up a lot of time.  
 
Using an ifelse statement I can isolate the appropriate distance from the sp.correlogram function, but when I try to paste or cat the number from the ifelse statement to the name "mat", it is not recognized as a listw.  Is there a way to speed the along?
 
Thank you,

Terry
 
 

	[[alternative HTML version deleted]]


