1

I am doing empirical research on the impact of wind turbine proximity on property values. I've built the spatial lag, error, and SAC models. My problem is that, after specifying the weights matrix, I cannot run the regression models. R gives me an error that "error cannot allocate vector of size e.g 70 Gb". There are a few things to mention:

  1. My original data contains 1.4 million observations, however, it does not work with 100k observations as well.

  2. For properties I have identical coordinates because the coordinates are the centroid of the grid where houses are located (there is more than one house in some grids, meaning that several houses share the common coordinates). I specified the weights matrix with the fixed distance

  3. My computer has 32gb RAM

# 
neighbors_nb <- dnearneigh(x=st_geometry(house_final), d1 = 0, d2 = 2000)


# Convert the neighbor list to a row-standardized weights list
weights_list <- nb2listw(neighbors_nb, style = "W" , zero.policy = TRUE)

# regression model
model_e <- errorsarlm(eq_spa, data = house_final, 
                          listw = weights_list,
                          method = "eigen", zero.policy = TRUE)

My question is how can I deal with the error: cannot allocate a vector of size e.g. 70 Gb? if I can run the regression with 10k observations but not more than that, what could be the potential problem? matrix size? identical coordinates? or something else? Thank you very much in advance.

2
  • Hi @Rasim, were you able to solve this? If yes , do you mind please posting the answer ? Commented Aug 8, 2024 at 11:23
  • Hi @AdrianaCastilloCastillo, Unfortunately, I could not solve the problem, I let the R run it, however, it was almost one day that it was running and giving an error at the end. Instead of employing spatial econometric models on the whole dataset (1,4 mln), I used those models for just a subset of the dataset (10k) and used them as supplementary analysis. I used spatial fixed effects as the main model on the whole data, then there was no issue. Commented Aug 9, 2024 at 14:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.