Multiple regression with nonlinear variables
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Fernando Maturi
am 29 Jan. 2025
Kommentiert: Star Strider
am 2 Feb. 2025
Hello,
I am working with the attached dataset, where the first column represents temperature and the next six columns (2–7) correspond to temperature-dependent properties.
I would like to explore whether it is possible to model temperature as a function of these six properties simultaneously, similar to a multiple regression approach. I have previously done this with linear responses, but in this case, the relationships are nonlinear (sigmoidal, Z-shaped).
I considered using a generalized additive model (GAM), but I have no prior experience with this method and may be overlooking a simpler or more suitable approach.
Could anyone provide insights or suggestions on how to best tackle this?
Thanks in advance! :)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 29 Jan. 2025
I am not certain what you want to do.
Fitting a generalized additive model (GAM) for regression using the fitrgam function would go something like this —
T1 = readtable('temp-vs-properties.txt')
VN = T1.Properties.VariableNames;
figure
plot(T1{:,1}, T1{:,2:end})
grid
xlabel(VN{1})
ylabel('Properties')
legend(VN{2:end}, Location='best')
Mdl = fitrgam(T1, 'Var1')
I am not certain that I am plotting your data correctly.
There are other options, such as fitnlm that might be more appropriate, depending on what you want to do.
.
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!