Comparing 2 linear models
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I need to compare whether 2 linear models are significantly different from each other. I am fairly new to Matlab and am struggling to understand why I can't get a difference. Here is my code:
Good = isnan(yh_col) + isnan(u_col);
mdl = fitlm(yh_col(Good==0), u_col(Good==0), 'poly3');
figure
plot (mdl)
Goodf = isnan(yf_col) + isnan(ufished_col);
mdlf = fitlm(yf_col(Goodf==0), ufished_col(Goodf==0), 'poly3');
hold on
plot (yf_col, ufished_col, 'bo')
plot (mdlf)
hold off
anova2(mdl, mdlf)
As I say, I have 2 linear models and wish to compare their differences.
Any help is greatly appreciated!
Thanks.
1 comentario
Respuestas (0)
Ver también
Categorías
Más información sobre Analysis of Variance and Covariance en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!