Assign fitlme output to a variable
24 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael Higley
am 4 Feb. 2025
Kommentiert: Torsten
am 4 Feb. 2025
Is there a way to output specific fitlme parameters? Specifically, how can I assign the t-statistic value to a specified variable? I see how to output the entire fitlme model, but not how to extract a specific value in a function.
0 Kommentare
Akzeptierte Antwort
Torsten
am 4 Feb. 2025
Bearbeitet: Torsten
am 4 Feb. 2025
See
The functions that can be applied to a fitlme object are:
coefCI Confidence intervals for coefficients of linear mixed-effects model
plotPartialDependence Create partial dependence plot (PDP) and individual conditional expectation (ICE) plots
predict Predict response of linear mixed-effects model
random Generate random responses from fitted linear mixed-effects model
randomEffects Estimates of random effects and related statistics
2 Kommentare
Torsten
am 4 Feb. 2025
Usually it's done like in this example:
load imports-85
tbl = table(X(:,12),X(:,14),X(:,24),'VariableNames',{'Horsepower','CityMPG','EngineType'});
lme = fitlme(tbl,'CityMPG~Horsepower+(1|EngineType)+(Horsepower-1|EngineType)');
out = anova(lme)
out.FStat
out.pValue
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!