-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encounter ValueError when using FamaMacBeth... #427
Comments
@Cheungki rank deficiency means that one of the independent variables can be written as a linear combination of other independent variables. I cannot investigate it properly without accessing your data, but based on my finance knowledge, my best guess would be that market portfolio (MKT) can be created using a combination of other portfolios. Is there any way you could share the data? |
As @kapa112 said, it is really hard to tell without the data. Can you share the data somehow? The error indicates that you model is singular. When using FMB it must be the case that the X variables have some cross-sectional variation. This rules out some types of variables that only change with time (e.g., a dummy variable for the year). These are never needed since FMB behaves as-if time effects are included. |
Do you variables that do not change in each cross section, for example, time dummy variables? |
But I didn't add time dummy variables... |
Is risk premium a linear function of the other variables? Or is risk premium only a function of the year? |
Thanks a lot! That's the point! @bashtage |
Thanks for your attention. I got the error "ValueError: Model cannot be estimated. All blocks of time-series observations are rank
deficient, and so it is not possible to estimate any cross-sectional regressions." when using FamaMacBeth model to do regression on my own dataset.
Here is my codes:
The dataset is organized as followed:
Thanks a lot:)
The text was updated successfully, but these errors were encountered: