R Spatial Regression 2: All Spatial Models and Specification Tests

Поділитися
Вставка
  • Опубліковано 21 жов 2024

КОМЕНТАРІ • 74

  • @zoikonstantakopoulou2145
    @zoikonstantakopoulou2145 4 роки тому +12

    Dear Dr Burkey, this is another comment that expresses appreciation for your work. I used the entire playlist, as well as the material on your website, as a guide to successfully conduct the analysis for my masters' thesis. Before that I had zero knowledge and experience on the topic and there was no other way I could learn so much in such time if it hadn't been for you. Thank you for introducing me to the world of spatial econometrics!

  • @obleodemandre4342
    @obleodemandre4342 Рік тому

    Hi Dr. Burkey. Thanks for all the great info in this series! Much of what was learned here will be used in my undergraduate thesis. I'd love a continuation of this series looking at how to work with spatial panel data.

  • @PabloEvia
    @PabloEvia 2 роки тому +1

    Would be thrilled to see a continuation of your interesting videos on Spatial Econometrics! I have seen all of them, and I am eager to see more!

    • @jacksonkimani3336
      @jacksonkimani3336 2 роки тому

      @Pablo Evia, very interesting videos and we hope to lobby him to continue with this course

  • @debbracisneros8724
    @debbracisneros8724 4 роки тому +3

    You don't have an idea of how helpful all these videos were!! Thank you so much!

  • @coolis1100
    @coolis1100 Рік тому

    Dear professor Burkey, thank you a lot for your videos on the Spatial Econometrics course, they meant a lot to me and I learned so much about Spatial Econometrics! And yeah, your videos are global with a positive ripple effect!
    I would definitely love to explore more about spatial econometrics and hopefully, you will return to make new videos on this topic!
    Thank you for all your work!

  • @yasminavizuete7327
    @yasminavizuete7327 Рік тому

    I really appreciate your help understanding Spatial Econometrics.

  • @themenchaca
    @themenchaca 5 років тому +3

    This was a phenomenal introduction to spatial regression! Thank you so much for putting this series together. I would also be very interested in hearing your opinion about how to best extend these models to include a time component and to model binary and count outcomes.

    • @BurkeyAcademy
      @BurkeyAcademy  5 років тому +1

      Thanks! re: Binary, spatial probit models are pretty common- once you understand spatial linear models, spatial probit is a pretty straightforward extension. Re: time, spatial panel data models are a little less well represented in R, but the splm package by Millo and Piras will do the basics.

    • @themenchaca
      @themenchaca 5 років тому

      BurkeyAcademy Thank you! And off to check out splm!

  • @jacksonkimani3336
    @jacksonkimani3336 2 роки тому

    Hi Dr. Burkey, first of all thank you for this great masterpiece on spatial statistics. It is invaluable and I have followed and worked on all the videos from episode 1 to 13. Mine is a big thank you and looking forward to more videos. I will apply the knowledge gained for agricultural research looking at neighbour effects of on adoption of sustainable farming interventions in Africa such as soil management practices, extension services and climate-smart agriculture. Thank you once again.

  • @Stephanbitterwolf
    @Stephanbitterwolf Рік тому

    Thank you so much for sharing your knowledge in an approachable manner.

  • @yulinliu850
    @yulinliu850 4 роки тому

    Thanks so much for this series of lectures/videos! Please teach us more on this topic.

  • @therpope
    @therpope 5 місяців тому

    Dear Dr Burkey, wondering. If I run LR.sarlm and it gives me a high p-value, am I *forced* to drop all the way down to OLS?

  • @chungsnote2999
    @chungsnote2999 3 роки тому

    Thank you for this great video. I learned from you. Even though I am working on Stata, the logic explainations are supper useful.

  • @sirvachjumani7215
    @sirvachjumani7215 2 роки тому

    Nice videos every to learn the spatial models and implementation, it will be good to bring some martial for python lovers. Finally appreciate your effort of work and dedication.

  • @alissonbarreto2841
    @alissonbarreto2841 4 роки тому

    Hi mr Burkey. Do you know how can I select a spatial model when I using panel data? Just look at AIC SC criterion is enough? I read there's still no consensus test to verify spatial autocorrelation in residues of spatial panel data models.

  • @gueyenono
    @gueyenono 2 роки тому

    Dr. Burkey, thank you very much for the greatest introduction to spatial econometrics with R on UA-cam. I would like to ask a question. Are you aware of any spatial model involving two weight matrices? I know that you mentioned that weight matrices can be combined (e.g. a dot product), but is there a strand of the literature using a weight matrix (w1) for the lag of y (rho w1 y) and and another weight matrix (w2) for the lag of x (X w2 rho) in the same regression equation? You always emphasize that we should "think" about the model and makes choices that make sense. In my case, using two matrices would make much economic sense. Also, if the answer to my question is yes, do you know of any implementation in R. Much appreciation.

    • @BurkeyAcademy
      @BurkeyAcademy  2 роки тому +1

      Yes, there are models with multiple weight matrices, see for example rrs.scholasticahq.com/article/8141. I have never run a model like this, but have seen in some of the functions in spreg that you can specify separate weights matrices.

    • @gueyenono
      @gueyenono 2 роки тому

      @@BurkeyAcademy This is very much appreciated.

  • @Luiza2600
    @Luiza2600 2 роки тому

    Hello Dr Burkey, first of all thank you for putting your time and effort into these videos, they are saving my undergrad thesis. One thing that came to my attention is that Elhorst (2010)'s strategy of specification does not include some models, like SDEM, which is preferable in Lesage (2014)'s view.
    I've recently read a paper that tests non nested models with the log likelihood ratio, but instead of comparing for example SDEM and SAR directly, it runs both in a LR test against OLS, and sees which performs the best. Do you think that this method is valid?

    • @BurkeyAcademy
      @BurkeyAcademy  2 роки тому

      Elhorst tries to combine some of Anselin's specification strategy with LeSage's, which is fine, I guess. It is more of a "bottom up" approach, starting with OLS as the premise and asking "Should we consider a spatial model?", while LeSage starts with the premise that a spatial model is probably necessary (due to the nature of the subject being studied) and asks "Should we restrict this model back to an OLS", or "Does the spatial model provide enough additional explanatory power over OLS to deserve consideration?" Either method is fine, as long as the method allows consideration of the Spatial Durbin Model. Overall I fins LeSage's approach more compelling, but that might just be because I know Jim (LeSage) a lot better than I know Luc or Paul. ☺

  •  5 років тому

    This is great. From your experience, what would be the best model for a city covered by an hexagonal grid comprising 3500 hexagons? Each hexagon is 250 mts long. The grid covers a latinamerican capital city, where you have the downtown area, the commercial areas, the wealthy area, the poor area, residential areas, and all the heterogeneity you would expect. Of course the grid is packed with all the nice-to-have variables. I put all that in a R Shiny webapp. spgwr library takes too long to calculate the regression, but it works. I'm exploring alternative approaches.
    Thanks

  • @neilshanloedy4915
    @neilshanloedy4915 3 роки тому

    Thank you for the explanation, it was well taught and very helpful! I have a question, if I am building a quantile spatial autoregressive model, do I also have to calculate the direct, indirect, and total effects to interpret the results? Because all the papers that I found, did not calculate that, and it makes me wonder....

  • @hoonoh6602
    @hoonoh6602 4 роки тому

    Hello. What would be the remedy for heteroscedasticity in a spatial model? Does it have robust standard errors like OLS models? I heard Bayesian method prevent spatial models from having heteroschdasticity?

    • @BurkeyAcademy
      @BurkeyAcademy  4 роки тому

      Two possible remedies: 1) Use a package such as sphet in R that is designed to correct for heteroskedasticity. 2) It is theoretically possible to use a sandwich estimator (aka Huber Eicker White), but I have not done this. "Experts" have told me not to worry too much about heteroskedasticity, that usually the impact on standard errors isn't large enough to matter. While I am not an expert in Bayesian methods, I am certain they don't prevent heteroskedasticity. However, is you are a Bayesian, the heteroskedasticity won't matter to you since you are not calculating p values, you are generating "credible intervals", which I guess wouln't be affected?

  • @Hastur876
    @Hastur876 4 роки тому

    Hey Mark: Elhorst in "Applied Spatial Econometrics, Raising the Bar" (2010) says that after doing the Anselin Robust LM tests, if you get a positive both for lag-Y and lag-error, you should move right to a Spatial Durbin model. The idea is that, even if the true data generating process is anything else (except a Manski), a Spatial Durbin will still correctly estimate the coefficients in an unbiased manner.

    • @BurkeyAcademy
      @BurkeyAcademy  4 роки тому +1

      Right- there are many different "camps" with different recommendations. If you are at all familiar with how much disagreement there is in the "proper" way to specify simple, cross-sectional OLS models, when you move to spatial models the problems are compounded even more, and then you have to choose the "proper" way to estimate the parameters (Bayes, ML, GMM, ?). Anselin, LeSage, and Kelejian all have different ideas about this, and Elhorst tries to synthesize LeSage and Anselin. I like all of these guys, and know them all to one extent or another. I am most convinced by LeSage's recommendations, probably because he has bought me more beer than the others (which means he has had the chance to "sell" me on his reasoning more). I think that the LM Lag and Error tests that Anselin invented were a huge breakthrough at the time, but right now the LR restriction tests are the better approach- but you first have to decide if your process is local or global, and go with Spatial Durbin OR Durbin Error (which is another important option aside from Manski). However, I am NOT a leading authority to be listening to- I can only present what I know so that people can get started with these models. In the end, I hope people continue to learn and become much better than I am at this! I have not had a chance to keep up with this for the last couple of years, so I am getting worse at this! I hope you keep getting better!

  • @scottnelson7841
    @scottnelson7841 4 роки тому

    Really appreciate the videos!

  • @sowjanyadhulipala3403
    @sowjanyadhulipala3403 4 роки тому

    Thank you for this great video. I have a doubt about predictions. How to predict the y values of the new observations of these spatial units? I have gone through "spatialreg" r documentation file and found out there is something called "predict.sarlm" to do this. How this works if we have data for only a few spatial units for prediction/forecasting? How "predict.sarlm" will know the new data we have given is for some particular spatial units? Do you have any idea on this? If yes, can you please provide some details? Thank you once again.

    • @mina.zamanian
      @mina.zamanian 4 роки тому

      I have the same confusions about out-of-sample validation of spatial models. I appreciate if someone help us with that.

  • @MohammadKhan-nc3oy
    @MohammadKhan-nc3oy 6 років тому +1

    Thank you so much for the video! Will it be possible for you to run a spatial probit model in R? I am having trouble doing that. It will be really helpful for me.

    • @BurkeyAcademy
      @BurkeyAcademy  6 років тому

      It is near the top of my to do list, but right now I am so busy that I am not able to make many videos. I will try!

  • @ishfaqkhan7184
    @ishfaqkhan7184 2 роки тому

    Dear Professor:
    I am unable to run the command "LR.sarlm(reg4, reg5)", Every time when i run it the error message appears i.e. Error in LR.sarlm(reg4, reg5) : could not find function "LR.sarlm"..... How to fix it? [I have tried after loading the "spatialreg " package as well but still did not work, following your steps and data you have provided.]
    The "bptest.sarlm(reg5,studentize=TRUE)" command is also not working.............

    • @BurkeyAcademy
      @BurkeyAcademy  2 роки тому

      It looks like they changed the function names. Why they do this, who knows? See the current documentation for the correct command names. It looks like the first is LR.Sarlm now.

    • @ishfaqkhan7184
      @ishfaqkhan7184 2 роки тому

      @@BurkeyAcademy Thank You for your Reply, Yeah it worked now with the changed name... I have tried to find if either the command is changed or moved to another package before writing to you but i could not succeed(though I had spent much time on googling it). I am new in the field of spatial data may be thats why i could not reach to the conclusion / find the solution on my own.
      Your videos are very clear, understandable, explanatory and helpful, I hope and I wish if you keep it continue and make more videos like these exploring the whole area of spatial econometrics like how to deal with the problem of hetereskedasticity if it exists there, also the time series and panel data if can be dealt in the spatial framework......
      I would love to learn more from you....

  • @simontichutab3957
    @simontichutab3957 5 років тому

    Great practical Tutorial on Spatial Econometrics. Thank you, sir. I have created a spatial weight matrix from Geoda. But in Rstudio, When I try to convert the matrix to rook or Listw, I am being told: "Empty sets created". What can I do about this? Thanks, Professor and hoping to hear from you soon

  • @profjoaoluizpacheco2471
    @profjoaoluizpacheco2471 4 роки тому

    Wonderful work dear master!
    I wonder if it is possible to estimate a dynamic spatial panel in R ...
    In Stata there is the XSMLE module, but I didn't find anything similar in R or even in the Pysal package
    for Python
    But I think something is going unnoticed by me ... :(

    • @BurkeyAcademy
      @BurkeyAcademy  4 роки тому

      I am not sure- most of the people I know doing that kind of work use Matlab. I think Jim LeSage has some Matlab code to do it.

  • @olyasok17
    @olyasok17 4 роки тому

    Thank you for the video, very helpful!!! I have a question: is there a spatial model that would be able to let's say capture the effects of changes of both unemployment (independent variable) and crime rates (dependent variable) in the neighbouring county on the crime rates level in our county?

    • @BurkeyAcademy
      @BurkeyAcademy  4 роки тому +1

      Yes, that would most likely be a Spatial Durbin model. Watch this video if you haven't already: ua-cam.com/video/6qZgchGCMds/v-deo.html

  • @何志超-v7o
    @何志超-v7o 4 роки тому

    Dear Burkey, thanks a lot for your greatly useful tutorial. I have a question: if I do not want to include all lag X into Spatial Durbin Model, how should I code my model? For example, I just want to exclude lagSALESPC and want to keep all the other lagx?

    • @BurkeyAcademy
      @BurkeyAcademy  4 роки тому

      You would probably have to customize your own code for estimating a model like this- you'd have to talk to one of the people who can write their own code to estimate models, such as LeSage, Pace, LaCombe, Piras... I am not quite up to that task yet.

    • @何志超-v7o
      @何志超-v7o 4 роки тому

      @@BurkeyAcademy Thanks a lot for your fast response. I am trying to do as you suggested.

    • @何志超-v7o
      @何志超-v7o 4 роки тому

      @@BurkeyAcademy Dear Burkey, I check R Document on lagsarlm and find the solution. We can add Durbin = ~ SALESPC, so that we can get the SDM which only includes lagSALESPC and exclude the other lagX.

  • @yasminavizuete7327
    @yasminavizuete7327 11 місяців тому

    In an SDM model, the dependent variable is the natural logarithm of poverty, and the independent variable is the employment rate. How is the relationship interpreted if the intercept is -0.0166? Is there a transformation to interpret the poverty variable without the logarithm concerning the same intercept?

    • @BurkeyAcademy
      @BurkeyAcademy  11 місяців тому +1

      Yes, just as in any other model you could raise e to that power. However, as with most linear models, this would be a nonsensical number to discuss, since we have no information about what happens when employment is at zero (in other words, it is a placeholder and should no be interpreted literally).

  • @katepeng3774
    @katepeng3774 3 роки тому

    Thank you so much for this video! It makes the spatial regression much easier for beginners to understand. The pdf file "The Mother of All R Spatial Econometrics Handouts" clarified the relationship among those alien-like spatial regressions. I have a question but don't know where to ask the author, so I post it here and hopefully the author would help me out. In that PDF file, it is mentioned that "Note on SARAR: Using the same W matrix for lag and error terms can lead to identification problems. Probably best to avoid these models". I wish to know more about the disadvantage of SARAR, could the author suggest any literature reading? Also, does the author have any youtube video on SARMA?

    • @BurkeyAcademy
      @BurkeyAcademy  3 роки тому +1

      Burkey here- I think the identification problems are mentioned in one or both of the following Lesage&Pace papers: "Pitfalls in Higher Order Model Extensions of Basic Spatial Regression Methodology", or "The Biggest Myth in Spatial Econometrics". In terms of SARMA, I have never learned much about that model since Nither Anselin nor Lesage/Pace seem to think much of it.

    • @katepeng3774
      @katepeng3774 3 роки тому

      @@BurkeyAcademy Thank you so much for this clarification. To me, your youtube videos on spatial regressions are much more clear than textbooks! Thank you!

  • @sanaayakurup5453
    @sanaayakurup5453 5 років тому

    Thank you so much for this video! It helped me so much. Would you be able to make a video on running GSEM models in R? It would really be of great help to me!

    • @BurkeyAcademy
      @BurkeyAcademy  5 років тому +1

      By GSEM, you mean Structural Equation Models? This is something I am not an expert in, but I can add it to the "to do list"!

    • @sanaayakurup5453
      @sanaayakurup5453 5 років тому

      @@BurkeyAcademy yes! Structural equation models with Spatial data! Thank you so much!

  • @yantiher
    @yantiher Рік тому

    Thank you so much...

  • @felixlandry3193
    @felixlandry3193 5 років тому

    Your videos are really helpfull, thank you very much! Do you know if it possible to run multivariate spatial models, such as RDAs and PCAs, in R?

    • @BurkeyAcademy
      @BurkeyAcademy  5 років тому

      I am not familiar with what an RDA is. By PCA do you mean Principal Component Analysis? If so, then definitely yes. If a type of analysis exists, is is almost certainly available in R.

  • @scottnelson7841
    @scottnelson7841 4 роки тому

    Is there a clever way in R to output predicted values from a Durbin model?

    • @BurkeyAcademy
      @BurkeyAcademy  4 роки тому

      Fitted values, or predictions for a new set of X's? For the fitted values, reg1$fitted.values is the part of the regression object containing them. For outside data, look at the manual for spatialreg under "predict"- I think it does it, but haven't had occasion to do this personally.

  • @giorne22
    @giorne22 4 роки тому

    Thank you so much!

  • @tifaniuna
    @tifaniuna 5 років тому

    Thank you for the videos! it has helped me a lot. I was wondering if you could cover spatial dynamic panel data estimation by using GMM (instead of maximum likelihood).. it would really help me a lot. I am used to using Stata, but I don't think GMM estimation for spatial dynamic panel can be done there (I am aware I could use Stata for ML, but I want to estimate my model using GMM estimation). So I am learning R entirely through your videos. Once again, thank you so much!

    • @BurkeyAcademy
      @BurkeyAcademy  5 років тому

      Thanks for the comment! However, I am not trained in the use of GMM, and am not very familiar with dynamic panel models. I am taking more classes now(at 50 years old!), and hope I can get into these someday.

    • @tifaniuna
      @tifaniuna 5 років тому

      @@BurkeyAcademy Thank you for your reply. I see.. good luck with your classes! 50 years old is still young, I once was in the same class with a doctoral student who was 72 years old :D

  • @ronaldoribeiro8798
    @ronaldoribeiro8798 4 роки тому

    great videos!

  • @hairongchen3854
    @hairongchen3854 5 років тому

    It is really helpful! Thank you so much!! Is it possible to do a spatial logit model in R?

    • @BurkeyAcademy
      @BurkeyAcademy  5 років тому

      Yes, it is. I am not familiar with this, but I know the McSpatial library does logits a couple of different ways. Check out Dan McMillen's page here: sites.google.com/site/danielpmcmillen/r-packages

  • @vikassinghstsm.phil-ph.dju259
    @vikassinghstsm.phil-ph.dju259 6 років тому

    Sir, how can i detect spatial cluster using R?

    • @BurkeyAcademy
      @BurkeyAcademy  6 років тому

      This isn't something I typically do, but gsp.humboldt.edu/OLM/R/03_02_ClusterAnalysis.html seems to address your question.

  • @EsinaViwn9
    @EsinaViwn9 5 років тому +1

    The solid practical introductory course in spatial methods. Thanks for your work! A few comments:
    1. You have mentioned that in order to compare SDM and SDEM we have to use some Bayesian tricks. I guess I've caught the idea why is it so, but still, it would be great if you could elaborate on Bayesian estimations and why do they necessary (why can`t we just use frequentist approach [e.g. compare likelihoods for these models]?).
    2. Here is the great complement of your course for Stata users: ua-cam.com/video/54HoO0KgWLQ/v-deo.html (estimation of basic models with ready-to-use stata .do file)
    3. As a suggestion for a continuation: spatial models in panel data setting, dynamics and interpretation questions (direct\indirect + longrun\shortrun effects)

    • @BurkeyAcademy
      @BurkeyAcademy  5 років тому

      Hi, and thanks for the questions and feedback. 1) SDM and SDEM are not "nested" models. The typical model comparison tools (F test, LR test, Wald Test) assume that by imposing restrictions on one model (setting certain parameters to zero, for example), you can end up with another model. Since you can't do that to go between SEM and SDEM, these tests don't work. I'll need to bring in one of my Bayesian buddies to help me explain how one could do this. 2) Thanks for the STATA info. 3) I will try to do some panel model and probit videos this summer!

    • @EsinaViwn9
      @EsinaViwn9 5 років тому

      Thanks for the quick response, I have two other points to be clarified: 1. What are the technical difficulties with islands (no neighbours) in contiguity matrix? What do they break? (because, at first glance, it seems that collapsing of this pWy into 0 for some observation doesn`t cause any trouble) 2. To represent panel data spatial exploratory analysis is this convenient to calculate Moran`s I for every year separately and report these figures in one table or there is a better way to do this?

  • @citraamanda5860
    @citraamanda5860 6 років тому

    Dear Professor Burkey, it is so helpful! Thanks for making explanations. I am a postgrad student, and I am doing spatial competition in my thesis. May I discuss about spatial econometrics model with you? Can I have your email?
    Thanks you so much!

    • @BurkeyAcademy
      @BurkeyAcademy  6 років тому

      Go to my website, you can find it there!

    • @citraamanda5860
      @citraamanda5860 6 років тому

      BurkeyAcademy yes, I got it, thanks Professor! :)