I am running a spatial panel regression in R using spml
from package splm. When I conduct this on about 1/200th of my data, the program executes. But when I try to do so on a third of my data, R uses up all the memory on the terminal I am working on and the program crashes. My code for specifying the spatial regression is below. How would I make this function operate efficiently enough to produce results and not crash? My terminal has 22 core, so parallel processing is likely an option - I just don't know how to perform this with spml.
results = spml(fm,
data=dtaSub,
listw=weightsList,
model="within",
effect = "twoway",
spatial.error = "b")
```