Multiple regression with nonlinear variables
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Fernando Maturi
il 29 Gen 2025
Commentato: Star Strider
il 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 Commenti
Risposta accettata
Star Strider
il 29 Gen 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Linear Regression in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


