Está en la página 1de 7

data = 8811, 0.5<, 814, 1.1<, 812, 0.9<, 89, 0.

6<,
813, 1.2<, 813, 0.9<, 815, 1.5<, 817, 1.3<, 815, 1.1<, 813, 0.7<<
8811, 0.5<, 814, 1.1<, 812, 0.9<, 89, 0.6<, 813, 1.2<,
813, 0.9<, 815, 1.5<, 817, 1.3<, 815, 1.1<, 813, 0.7<<
ListPlot@dataD
1.4

1.2

1.0

0.8

0.6
10

12

14

16

lm = LinearModelFit@data, x, xD
FittedModelB

-0.536842 + 0.114912 x

lm@"ANOVATable"D
DF SS
x
Error
Total

1
8
9

MS

F-Statistic P-Value

0.60214 0.60214
15.348
0.31386 0.0392325
0.916

0.00443301

model = LinearModelFit@data, x, xD
FittedModelB

-0.5368421052631585` + 0.1149122807017544` x

model@"BestFit"D
FittedModelB

-0.536842 + 0.114912 x

- 0.536842 + 0.114912 x
Plot@model@"BestFit"D, 8x, 0, 20<D
1.5
1.0
0.5
-0.5

10 15 20

Show@ListPlot@dataD, Plot@model@"BestFit"D, 8x, 0, 30<DD

LinearRegression2.nb

1.5

1.0

0.5

10

15

20

-0.5

1.4

1.2

1.0

0.8

0.6
10

12

14

16

model@"ParameterTable"D
Estimate
1
x

Standard Error t-Statistic P-Value

-0.536842 0.392215
0.114912 0.0293319

-1.36874 0.208276
3.91765 0.00443301

8sr, fr< = model@8"StandardizedResiduals", "FitResiduals"<D;


88ListPlot@srD, ListPlot@frD<< GraphicsGrid
1.5

0.3

1.0

0.2

0.5

0.1

-0.5
-1.0

10

-0.1
-0.2

10

LinearRegression2.nb

ListPlot@model@"CookDistances"D,
Filling Axis, FillingStyle Thick, PlotStyle ThickD
0.30

0.25

0.20

0.15

0.10

0.05

10

ListPlot@Transpose@8data@@All, 1DD, model@"CookDistances"D<D,


Filling Axis, FillingStyle Thick, PlotStyle ThickD
0.30

0.25

0.20

0.15

0.10

0.05

10

12

14

16

Show@ListPlot@lm@"Data"D, PlotStyle GreenD, Plot@lm@xD, 8x, 0, 100<DD


1.4

1.2

1.0

0.8

0.6
10

12

14

16

LinearRegression2.nb

ListPlot@lm@"FitResiduals"DD
0.3

0.2

0.1

10

-0.1

-0.2

data = Map@8@@1DD, @@2DD, @@3DD, 1.2 + H3.7 + RandomReal@8- 1, 1<DL @@1DD 2 @@2DD + 23.4 @@3DD< &, RandomReal@10, 8100, 3<DD;
ListPlot@lm@"FitResiduals"D, Frame True, PlotRange AllD
0.3

0.2

0.1

0.0

-0.1

-0.2

10

Table@ListPlot@Transpose@8data@@All, iDD, lm@"FitResiduals"D<D,


Frame True, FrameLabel 88x, y, z<@@iDD, "Residual"<D, 8i, 3<D Row
Transpose::nmtx : The first two levels of the one-dimensional list
885.36518, 1.29061, 7.2075, 4.91294, 5.40635, 5.91064, 8.3965, 6.62759, 36, 0.871698, 7.46552,
7.04735, 0.495328, 2.63034, 7.50112, 50<, 81<< cannot be transposed.
ListPlot::lpn :
Transpose@885.36518, 1.29061, 7.2075, 4.91294, 5.40635, 5.91064, 8.3965, 6.62759, 36, 0.871698, 7.46552,
7.04735, 0.495328, 2.63034, 7.50112, 50<, 81<<D
is not a list of numbers or pairs of numbers.
Transpose::nmtx : The first two levels of the one-dimensional list
889.63029, 9.3223, 9.00921, 9.76776, 9.42124, 3.42922, 9.90755, 2.26756, 36, 0.924591, 4.28262,
8.83415, 0.546595, 5.1298, 1.4839, 50<, 8-20, 9<< cannot be transposed.
ListPlot::lpn :
Transpose@889.63029, 9.3223, 9.00921, 9.76776, 9.42124, 3.42922, 9.90755, 2.26756, 36, 0.924591, 4.28262,
8.83415, 0.546595, 5.1298, 1.4839, 50<, 81<<D
is not a list of numbers or pairs of numbers.

LinearRegression2.nb

Transpose::nmtx : The first two levels of the one-dimensional list


884.44758, 0.999687, 0.819712, 8.13746, 6.31602, 6.73554, 0.672818, 3.93504, 36, 6.18755, 2.5407,
7.6622, 4.15472, 8.65039, 4.89178, 50<, 81<< cannot be transposed.
General::stop : Further output of Transpose::nmtx will be suppressed during this calculation.
ListPlot::lpn :
Transpose@884.44758, 0.999687, 0.819712, 8.13746, 6.31602, 6.73554, 0.672818, 37, 6.18755, 2.5407, 7.6622,
4.15472, 8.65039, 4.89178, 50<, 8-20, 8, -19<<D
is not a list of numbers or pairs of numbers.
General::stop : Further output of ListPlot::lpn will be suppressed during this calculation.

LinearRegression2.nb

ListPlot@
Transpose@885.36518, 1.29061, 7.2075, 4.91294, 5.40635, 5.91064, 8.3965, 6.62759,
2.76501, 7.81633, 8.31984, 6.1125, 8.43995, 3.72182, 1.78014, 2.75782, 5.2071,
2.86418, 7.3832, 3.31605, 8.83012, 1.36831, 8.97648, 0.926344, 0.745619,
3.06108, 4.7087, 6.40686, 0.157947, 9.36017, 6.34642, 6.62393, 8.34734, 9.90251,
6.32867, 6.54721, 1.76307, 8.68685, 0.829238, 9.92336, 2.79622, 9.77547,
0.320374, 7.99695, 0.871698, 7.46552, 7.04735, 0.495328, 2.63034, 7.50112,
6.16351, 7.98549, 8.6285, 2.50416, 3.07304, 7.00311, 0.599024, 9.12388,
4.72163, 7.63038, 7.85156, 7.1872, 1.64735, 7.33292, 1.1822, 5.28029, 1.72468,
3.7677, 7.24626, 4.73755, 9.24144, 0.826351, 3.26945, 8.31951, 8.9408, 9.78744,
1.80746, 8.84742, 7.25445, 6.92825, 9.40709, 4.76559, 4.37058, 5.30248,
2.88626, 2.11803, 7.8474, 5.10635, 1.41307, 0.924956, 8.63597, 6.41567,
1.7046, 0.716923, 8.55149, 0.622807, 2.15654, 0.404692, 9.00449, 5.71285<,
8- 0.227193, 0.0280702, 0.0578947, 0.102632, 0.242982, - 0.0570175,
0.313158, - 0.116667, - 0.0868421, - 0.257018<<D,
Frame True, FrameLabel 8x, Residual<DListPlot@
Transpose@889.63029, 9.3223, 9.00921, 9.76776, 9.42124, 3.42922, 9.90755, 2.26756,
1.17473, 5.03793, 5.04926, 6.17865, 8.36618, 2.43934, 4.19419, 1.10685,
5.15305, 9.73746, 8.24871, 6.21598, 4.57769, 3.22451, 1.13084, 9.20243,
2.04524, 3.35975, 4.52553, 8.82656, 1.60049, 7.99093, 5.19572, 9.15218,
3.90622, 7.15748, 7.5203, 9.40141, 4.63054, 0.408194, 1.51661, 5.70919,
6.82226, 2.6785, 2.8602, 1.2817, 0.924591, 4.28262, 8.83415, 0.546595, 5.1298,
1.4839, 7.80462, 0.0831779, 7.97817, 0.168147, 5.91312, 1.67719, 5.30523,
2.99932, 8.4096, 7.52965, 4.44461, 7.49516, 2.57915, 5.74466, 6.7784, 9.47249,
1.57705, 8.02761, 5.42373, 6.87574, 1.92358, 8.51102, 3.92884, 0.909075,
1.06909, 3.3738, 1.77719, 5.77387, 9.29235, 9.17705, 9.16547, 2.00261, 7.97531,
6.36184, 6.48581, 5.55035, 9.9659, 2.46884, 5.66684, 6.07536, 1.5968, 4.91554,
2.81157, 0.562458, 9.88447, 7.79237, 9.78668, 1.66011, 0.0165813, 9.15202<,
8- 0.227193, 0.0280702, 0.0578947, 0.102632, 0.242982, - 0.0570175,
0.313158, - 0.116667, - 0.0868421, - 0.257018<<D,
Frame True, FrameLabel 8y, Residual<DListPlot@
Transpose@884.44758, 0.999687, 0.819712, 8.13746, 6.31602, 6.73554, 0.672818,
3.93504, 9.4164, 8.32693, 3.26332, 1.8048, 5.0816, 3.87435, 6.84399, 7.5847,
6.77568, 1.47956, 9.79156, 8.53215, 3.98625, 0.586791, 1.2583, 1.49461,
1.46087, 1.5909, 7.318, 0.478078, 7.51726, 1.92422, 5.03487, 0.300728, 6.7219,
7.94543, 0.587865, 2.97282, 5.87032, 2.1322, 3.52278, 7.91681, 8.1814, 4.516,
0.750642, 2.72441, 6.18755, 2.5407, 7.6622, 4.15472, 8.65039, 4.89178, 7.04441,
7.0106, 2.0222, 6.31961, 0.321643, 3.87845, 1.43479, 1.57249, 1.77348, 2.77664,
1.53545, 2.63933, 6.4359, 5.81235, 4.85007, 5.83462, 1.80468, 4.94309,
9.23043, 1.35064, 5.73583, 3.06424, 9.4312, 6.97993, 0.133054, 3.15422,
1.64146, 1.48176, 9.68831, 1.96252, 3.52753, 9.77121, 9.30153, 8.73739,
0.542736, 2.7793, 8.55323, 0.818013, 2.76932, 3.74473, 7.13024, 6.19903,
6.4499, 7.98257, 4.59456, 3.48393, 3.40006, 8.90577, 2.32538, 6.17661<,
8- 0.227193, 0.0280702, 0.0578947, 0.102632, 0.242982, - 0.0570175,
0.313158, - 0.116667, - 0.0868421, - 0.257018<<D,
Frame True, FrameLabel 8z, Residual<D
ListPlot@cd, Filling 0, Frame True, AxesOrigin 80, 0<,
PlotRange All, PlotLabel "Cook's Distances"D
ListPlot::lpn : cd is not a list of numbers or pairs of numbers.

ListPlot@cd, Filling 0, Frame True,


AxesOrigin 80, 0<, PlotRange All, PlotLabel Cook's DistancesD

LinearRegression2.nb

QuantilePlot@lm@"StandardizedResiduals"D,
Table@InverseCDF@NormalDistribution@D, qD, 8q, 1 100, 99 100, 1 50<DD

Show@ListPlot@grps, PlotRange AllD,


Plot@Evaluate@Map@Tooltip@lm@, tD, D &, groupsDD, 8t, 0, 10<DD

ListPlot::lpn : grps is not a list of numbers or pairs of numbers.


Show::gcomb : Could not combine the graphics objects in ShowBListPlot@grps, PlotRange AllD,

1.0
0.5
-0.5
-1.0

ShowBListPlot@grps, PlotRange AllD,

1.0
0.5
-0.5
-1.0

F
2 4 6 8 10

F.
2 4 6 8 10

También podría gustarte