Cluster Standard Errors with fitlm
이전 댓글 표시
I have panel data (county, year) and want to run a regression with individual-specific effects that are uncorrelated (a fixed effects regression in economics parlance). Does fitlm automatically cluster the standard errors? If not, is there a way to do this?
댓글 수: 4
Aditya Patil
2021년 7월 15일
Can you elaborate on what you mean by clustering of standard errors? I assume you are using fitlme, and want the errors for all the inputs to be clustered under some condition?
Joshua
2021년 7월 15일
Aditya Patil
2021년 9월 22일
Can you have a look at the examples provided in https://www.mathworks.com/help/stats/fitlme.html and let me know if this serves your usage? By providing random effect as (1 + x | g), you should be able to have correlation within group errors, while errors outside group will be uncorrelated.
Joshua
2021년 9월 22일
답변 (1개)
Aditya Patil
2021년 7월 16일
1 개 추천
Currently, clustered standard errors is not supported in Statistics and Machine Learning Toolbox. I have brought the request to the notice of concerned developers.
카테고리
도움말 센터 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!