Effacer les filtres
Effacer les filtres

Fitlm error with predictor and response variables

7 vues (au cours des 30 derniers jours)
John Good
John Good le 4 Déc 2020
Commenté : Ive J le 19 Déc 2020
I am trying to run a regression model on 83 funds and their returns. I have started by dividing them by 100 then subtracting the risk free rate. I am using fama french 6 factor model. I have attached photos for context, R1 is my returns, ff5 is my factor model, Rf is my risk free rate. Any help in understanding why I am getting the error regardign predictor and resposne variables would be apprecaited, when using the fama french 6 model factor how do I integreate this into my analysis. Thanks
  6 commentaires
John Good
John Good le 5 Déc 2020
any ideas Ive Ive?
Ive J
Ive J le 19 Déc 2020
Sorry I haven't received any MATLAB notification on this post.
Please share your data properly (not as image). Show you code also and the output you get from MATLAB. For instance,
x = rand(10, 2); % test predictor
y = rand(10, 1); % test reponse
mdl = fitlm(x, y)
Linear regression model:
y ~ 1 + x1 + x2
Estimated Coefficients:
Estimate SE tStat pValue
_________ _______ ________ _______
(Intercept) 0.4717 0.25349 1.8609 0.10508
x1 -0.087938 0.33145 -0.26532 0.79841
x2 0.010793 0.31584 0.034172 0.97369
Number of observations: 10, Error degrees of freedom: 7
Root Mean Squared Error: 0.27
R-squared: 0.0112, Adjusted R-Squared: -0.271
F-statistic vs. constant model: 0.0397, p-value = 0.961
Your image simply shows your design matrix is rank deficient (test stats are NaN or Inf), so either your data is problematic or the way you process them. That's why it's crucial to show all details/information you can when you ask a question.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Multivariate Models dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by