How to calculate 95% confidence interval using regression analysis?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anwesha Sharma
am 24 Feb. 2023
Kommentiert: Sulaymon Eshkabilov
am 27 Feb. 2023
I have a timeseries dataset of measured lengths of some lines. The dataset consists of dates from oct of one year to march of next year. How do I calculate the 95% confidence interval values using regression analysis for each season (e.g. oct 2003 to March 2004 and so on). Something like this as shown below (CI = 95% confidence interval).

2 Kommentare
Akzeptierte Antwort
Sulaymon Eshkabilov
am 24 Feb. 2023
If there is a linear fit model for x vs. y(x), then fitlm() can be used, e.g.:
x = (0:.1:13)';
Noise = 35*randn(size(x));
y = @(x)3*x.^2-5*x+3;
Y =y(x)+Noise;
YT=table(x);
YT.Y=Y;
FM =fitlm(YT, 'Y~x^2+x+1')
plot(FM)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!