Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_multipleregression.wasp
Title produced by softwareMultiple Regression
Date of computationFri, 18 Dec 2015 13:55:15 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2015/Dec/18/t1450446980h8p8fsaxcyduxbi.htm/, Retrieved Thu, 31 Oct 2024 23:34:02 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=286889, Retrieved Thu, 31 Oct 2024 23:34:02 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact143
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Notched Boxplots] [Notched Boxplot A...] [2015-12-11 09:57:46] [508ad00fbaced7ad8e80ddb3167ea0fd]
- RMPD    [Multiple Regression] [Multi-regressie t...] [2015-12-18 13:55:15] [08ad43dc796ab34076e7be4bfcaa9e56] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.32 2441
0.16 3406
0.12 4029
0.38 1924
0.18 2319
0.16 2156
0.22 2117
0.39 2189
0.35 2625
0.32 1959
0.39 3096
0.31 1997
0.22 1813
0.33 2648
0.22 2648
0.07 5782
0.27 2218
0.66 25289
0.73 25389
0.66 25196
0.6 24153
0.75 26079
0.7 26540
0.57 25099
0.45 27402
0.58 26206
0.73 26526
0.44 27154
0.67 24464
0.75 24967
0.58 24713
0.5 26733
0.73 24578
0.65 26092
0.75 24486
0.63 24630
0.53 26233
0.66 26492
0.72 24973
0.39 27437
0.67 23829
0.36 27158
0.64 25670
0.73 23530
0.49 24474
0.72 26668
0.5 26060
0.64 24856
0.76 24067
0.63 25545
0.66 24213
0.58 23703
0.67 23566
0.53 22876
0.62 22744
0.4 27615
0.55 24421
0.76 24728
0.64 25732
0.71 24204
0.71 23869
0.66 24120
0.69 22474
0.46 26406
0.71 22440
0.67 20387
0.53 21609
0.37 24905
0.61 21584
0.68 20920
0.36 5042
0.45 4353
0.22 7996
0.42 3998
0.34 4697
0.31 7837
0.58 3512
0.53 3503
0.54 3572
0.4 3918
0.47 4767
0.2 5833
0.4 4154
0.5 3894
0.46 4133
0.35 4273
0.33 5574
0.44 5029
0.34 5279
0.38 4876
0.59 3850
0.4 4109
0.43 4137
0.41 3725
0.31 5675
0.61 3405
0.57 3568
0.38 3408
0.17 7203
0.37 5392
0.51 4053
0.17 7863
0.35 3716
0.4 4027
0.52 3608
0.39 3333
0.4 3014
0.14 5014
0.18 4328
0.37 2956
0.17 6535
0.4 3153
0.34 3081
0.46 2996
0.39 3150
0.25 3673
0.41 2870
0.46 3230
0.24 3821
0.33 3178
0.48 2988
0.21 2347
0.28 2891
0.15 4775
0.17 4758
0.35 2962
0.34 2687
0.26 2825
0.33 4201
0.36 2545
0.34 2626
0.31 3556
0.13 6069
0.4 2795
0.39 2763
0.37 3024
0.3 2622
0.17 3800
0.17 5217
0.41 3163
0.25 3765
0.34 2991
0.41 4856
0.21 5752
0.38 3351
0.55 3392
0.39 3145
0.35 3820
0.19 4790
0.37 2729
0.38 3025
0.24 2428
0.33 2981
0.41 3051
0.17 6330
0.31 3006
0.33 3301
0.2 5265
0.39 3975
0.5 2643
0.34 3130
0.2 3832
0.38 3819
0.64 3037
0.58 4272
0.32 10589
0.36 8945
0.39 7764
0.34 8704
0.51 7546
0.52 7694
0.25 10499
0.58 7614
0.53 8248
0.6 8158
0.55 8174
0.59 8097
0.41 9154
0.34 10287
0.51 7972
0.56 7518
0.53 9492
0.56 8317
0.59 8158
0.39 9174
0.47 8262
0.23 10533
0.24 10434
0.42 8047
0.42 7831
0.55 8062
0.36 8834
0.46 8957
0.43 8753
0.56 7663
0.63 8290
0.48 8435
0.34 10802
0.48 9391
0.25 10280
0.59 8461
0.5 9152
0.51 8380
0.56 8171
0.54 8386
0.57 8212
0.61 9103
0.72 8461
0.66 8443
0.51 9253
0.57 8220
0.21 10435
0.31 8627
0.4 8196
0.23 9431
0.39 7917
0.25 8186
0.56 4350
0.54 9341
0.64 9545
0.4 10624
0.65 10665
0.36 11698
0.64 9516
0.58 8815
0.59 8389
0.61 10475
0.53 10170
0.65 9192
0.53 9198
0.68 8764
0.38 9996
0.44 9219
0.34 10801
0.62 8631
0.29 11110
0.45 8101
0.63 9696
0.66 10542
0.56 10069
0.34 11789
0.66 9416
0.43 9543
0.69 8919
0.63 8958
0.58 8933
0.31 11251
0.53 9589
0.72 8870
0.56 9108
0.51 9544
0.67 9611
0.21 11798
0.63 11269
0.63 10411
0.74 9690
0.7 9625
0.39 9522
0.56 10330
0.34 10803
0.62 9946
0.54 9782
0.31 11660
0.67 9960
0.57 10286
0.41 10790
0.59 10188
0.28 9465
0.58 7791
0.63 7793
0.67 8175
0.39 10328
0.33 4510
0.42 3589
0.36 4039
0.4 7656
0.46 4662
0.28 5001
0.4 7089
0.38 4103
0.55 4314
0.2 7187
0.19 5954
0.45 3597
0.4 3647
0.25 8287
0.46 4192
0.61 4046
0.23 5195
0.13 7626
0.45 5232
0.22 5251
0.4 5043
0.17 5842
0.55 4879
0.37 5429
0.31 4772
0.38 6159
0.48 3761
0.25 8832
0.35 4337
0.45 3979
0.42 4886
0.51 6057
0.38 4922
0.46 4650
0.44 4938
0.22 6610
0.25 6041
0.13 11379
0.2 10702
0.38 7455
0.51 8425
0.34 7679
0.44 8312
0.41 7238
0.33 9412
0.48 7698
0.39 7776
0.39 7870
0.42 8122
0.4 9138
0.21 10187
0.4 8315
0.39 8424
0.58 7731
0.43 8079
0.6 7926
0.18 9975
0.51 8397
0.4 8572
0.53 8157
0.45 7856
0.19 9835
0.39 9524
0.4 7750
0.32 8221
0.32 8998
0.2 9875
0.5 8015
0.41 7749
0.4 8174
0.43 8504
0.4 11129
0.34 12615
0.48 12219
0.63 10828
0.5 11463
0.26 12524
0.53 10638
0.3 11085
0.38 10831
0.32 12022
0.42 10544
0.4 11569
0.42 10889
0.33 11064
0.33 11221
0.6 10339
0.47 10652
0.49 11155
0.53 3597
0.44 2768
0.49 2812
0.25 3781
0.21 7789
0.34 2886
0.4 2283
0.48 2389
0.17 3784
0.4 2990
0.4 3615
0.46 2767
0.43 2673
0.36 3068
0.53 2894
0.37 2621
0.18 6440
0.27 3082
0.17 5532
0.49 2421
0.39 3653
0.39 2656
0.39 3059
0.21 3341
0.44 2387
0.4 2469
0.32 2758
0.29 2254
0.42 2305
0.15 7075
0.4 2260
0.41 2988
0.25 2091
0.44 2169
0.54 15711
0.62 14409
0.66 17306
0.65 17157
0.61 17611
0.36 20394
0.69 18757
0.38 20250
0.53 17622
0.57 17270
0.43 18330
0.44 17580
0.6 18128
0.56 17261
0.49 17287
0.55 17433
0.53 17518
0.66 16890
0.35 18728
0.53 16953
0.36 17970
0.64 16920
0.33 19400
0.73 15769
0.54 17431
0.6 16058
0.62 15312
0.55 16214
0.64 15962
0.67 15852
0.75 15634
0.55 17699
0.36 16100
0.65 16252
0.13 17874
0.64 14058
0.39 14466
0.5 14531
0.57 14102
0.73 14014
0.51 16871
0.55 14903
0.26 16411
0.51 14687
0.43 14363
0.51 16062
0.3 15361
0.37 16134
0.44 14256
0.46 15863
0.73 14196
0.63 14120
0.51 14825
0.48 16946
0.74 23867
0.76 24107
0.75 24041
0.69 24415
0.59 24496
0.71 24022
0.44 24367
0.72 23869
0.7 24495
0.71 23818
0.7 24081
0.57 24132
0.72 23651
0.58 23622
0.63 23726
0.78 23942
0.48 24573
0.58 23085
0.73 22612
0.68 22960
0.66 22921
0.74 23510
0.69 22729
0.63 23047
0.78 22850
0.59 23426
0.69 22812
0.78 22446
0.41 23567
0.68 23185
0.64 22777
0.55 23508
0.81 23193
0.81 23006
0.77 22332
0.77 22347
0.45 23061
0.57 22887
0.69 22890
0.74 22701
0.76 22467
0.83 22357
0.78 22443
0.68 22824
0.57 22906
0.78 23059
0.76 23055
0.67 22564
0.69 18570
0.59 20329
0.77 19279
0.54 19541
0.63 19517
0.6 6519
0.55 7169
0.56 8107
0.35 10668
0.51 6650
0.63 5726
0.53 5224
0.39 6297
0.44 5011
0.49 5075
0.34 5434
0.28 11758
0.45 4531
0.57 5373
0.42 6343
0.33 20051
0.44 5482
0.54 5066
0.37 5040
0.56 5100
0.45 4679
0.29 10940
0.62 6035
0.54 5364
0.56 4424
0.42 4486
0.36 4962
0.2 10445
0.49 5973
0.38 5415
0.18 17792
0.52 5581
0.42 4997
0.41 6893
0.37 10181
0.37 7007
0.49 6621
0.47 7309
0.51 6114
0.42 5521
0.31 5263
0.43 5400
0.54 6141
0.35 5736
0.26 16104
0.14 10810
0.32 5057
0.39 5732
0.36 4000
0.26 4000
0.23 4200
0.46 3551
0.4 4025
0.49 5591
0.54 3868
0.4 3566
0.34 4525
0.37 3752
0.44 3182
0.25 6152
0.53 3548
0.26 6876
0.49 3199
0.49 3386
0.42 3411
0.2 6892
0.39 4920
0.49 3193
0.54 3054
0.42 3262
0.37 3509
0.47 3471
0.49 3101
0.28 5956
0.32 6232
0.53 5456
0.46 3186
0.38 3751
0.54 2973
0.33 5548
0.46 3219
0.19 6595
0.4 4886
0.51 3082
0.55 3516
0.41 3807
0.51 3607
0.49 3163
0.2 4981
0.44 3276
0.45 3278
0.38 3850
0.48 3439
0.21 5545
0.25 4749
0.33 3656
0.58 3520
0.45 4392
0.46 3057
0.15 6542
0.34 2785
0.39 3057
0.4 4379
0.7 23934
0.7 23625
0.49 26185
0.69 23777
0.68 24586
0.77 25439
0.67 24037
0.63 25403
0.53 25133
0.7 24023
0.73 23901
0.54 24892
0.74 24560
0.72 24226
0.73 24885
0.39 25466
0.7 24903
0.67 23761
0.77 23868
0.42 26118
0.76 25120
0.72 26119
0.68 25440
0.7 24206
0.6 25312
0.78 24499
0.77 24330
0.77 24217
0.62 25047
0.61 25817
0.67 25466
0.69 25410
0.78 26246
0.63 25718
0.79 26543
0.75 26723
0.7 26700
0.75 24743
0.66 25520
0.62 25298
0.43 26382
0.49 25719
0.77 24547
0.65 25640
0.31 26103
0.57 24911
0.65 25199
0.51 25308
0.65 17000
0.59 12000
0.56 20000
0.42 3915
0.35 3229
0.22 6671
0.15 5937
0.34 3639
0.26 4274
0.31 3781
0.16 5612
0.43 4498
0.37 3520
0.18 6323
0.47 3622
0.55 4085
0.3 3978
0.47 3788
0.39 3973
0.42 3268
0.46 6852
0.51 6237
0.22 9194
0.4 9177
0.37 6170
0.28 6295
0.38 5878
0.19 7172
0.42 5741
0.46 7093
0.43 5774
0.44 5690
0.26 7717
0.45 6511
0.27 6989
0.18 9006
0.44 6052
0.59 5094
0.34 6198
0.4 8845
0.42 6219
0.53 5984
0.27 7303
0.45 6887
0.58 8083
0.27 18978
0.3 25222
0.5 6093
0.55 7206
0.46 8070
0.42 16129
0.65 7646
0.52 5415
0.56 10480
0.58 5998
0.56 6289
0.69 6146
0.37 12308
0.55 7128
0.45 7653
0.29 10130
0.63 8741
0.52 7719
0.57 8167
0.39 7786
0.64 8091
0.58 8089
0.58 7219
0.52 7373
0.31 20659
0.56 7158
0.66 7503
0.35 7654
0.36 7747
0.32 8631
0.38 6867
0.3 17989
0.4 6798
0.42 7485
0.52 7085
0.45 7235
0.18 8534
0.27 7785
0.57 7017
0.52 5951
0.37 6709
0.46 6999
0.42 6175
0.45 5927
0.45 6703
0.61 6118
0.52 4565
0.22 6178
0.42 5389
0.4 5079
0.17 7382
0.53 4305
0.45 4216
0.2 7849
0.41 4248
0.41 4238
0.31 4746
0.54 4227
0.31 4946
0.34 4234
0.31 4379
0.42 5464
0.42 4240
0.45 5465
0.16 5634
0.39 3984
0.17 6957
0.34 4492
0.5 3863
0.4 3845
0.29 3768
0.12 6071
0.34 3794
0.28 4078
0.44 3927
0.46 3931
0.41 5368
0.29 5142
0.29 5165
0.34 4432
0.31 5082
0.12 6087
0.34 4434
0.31 4360
0.3 5634
0.14 7836
0.25 5394
0.39 4327
0.39 4142
0.18 5251
0.33 4951
0.34 4565
0.23 4463
0.12 5922
0.5 4581
0.3 7566
0.37 5500
0.38 5745
0.5 6924
0.47 5354
0.43 5563
0.37 5369
0.59 5658
0.54 5215
0.31 5824
0.34 6667
0.22 7795
0.5 5490
0.51 5232
0.32 7739
0.42 5404
0.41 6045
0.47 6012
0.31 6287
0.58 5185
0.2 8080
0.34 7229
0.44 5602
0.41 5329
0.44 5401
0.32 8283
0.51 6359
0.58 5457
0.46 5654
0.54 6391
0.46 5765
0.52 6707
0.17 8214
0.71 5621
0.46 6387
0.23 8299
0.56 6526
0.59 5514
0.33 6659
0.46 6023
0.58 5701
0.54 6628
0.61 5845
0.58 5778
0.53 5668
0.54 5982
0.34 8294
0.65 5970
0.37 7440
0.45 5385
0.3 6226
0.19 6905
0.19 7566
0.44 6033
0.41 3338
0.47 2778
0.59 2876
0.41 3059
0.49 2827
0.44 3819
0.56 3319
0.53 5529
0.56 2791
0.23 6521
0.51 2959
0.41 4378
0.28 6042
0.35 3715
0.26 6219
0.49 2890
0.49 3134
0.41 3544
0.39 3915
0.39 3139
0.48 2989
0.63 2856
0.36 5619
0.38 3955
0.57 3027
0.47 3760
0.27 6323
0.47 3362
0.34 6263
0.5 5720
0.59 3035
0.2 6509
0.58 3123
0.5 3332
0.55 3298
0.32 4579
0.36 2963
0.25 5861
0.42 4549
0.17 6211
0.66 2942
0.46 3181
0.45 5019
0.18 6590
0.26 4528
0.35 3744
0.46 3096
0.38 2893
0.42 3946
0.45 2838
0.4 2804




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 8 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ fisher.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=286889&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]8 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ fisher.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=286889&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=286889&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ fisher.wessa.net







Multiple Linear Regression - Estimated Regression Equation
%_winst_thuis[t] = + 0.341975 + 1.14533e-05Toeschouwers[t] + e[t]
Warning: you did not specify the column number of the endogenous series! The first column was selected by default.

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Estimated Regression Equation \tabularnewline
%_winst_thuis[t] =  +  0.341975 +  1.14533e-05Toeschouwers[t]  + e[t] \tabularnewline
Warning: you did not specify the column number of the endogenous series! The first column was selected by default. \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=286889&T=1

[TABLE]
[ROW][C]Multiple Linear Regression - Estimated Regression Equation[/C][/ROW]
[ROW][C]%_winst_thuis[t] =  +  0.341975 +  1.14533e-05Toeschouwers[t]  + e[t][/C][/ROW]
[ROW][C]Warning: you did not specify the column number of the endogenous series! The first column was selected by default.[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=286889&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=286889&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Multiple Linear Regression - Estimated Regression Equation
%_winst_thuis[t] = + 0.341975 + 1.14533e-05Toeschouwers[t] + e[t]
Warning: you did not specify the column number of the endogenous series! The first column was selected by default.







Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)+0.342 0.007351+4.6520e+01 3.302e-241 1.651e-241
Toeschouwers+1.145e-05 5.922e-07+1.9340e+01 6.621e-70 3.31e-70

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Ordinary Least Squares \tabularnewline
Variable & Parameter & S.D. & T-STATH0: parameter = 0 & 2-tail p-value & 1-tail p-value \tabularnewline
(Intercept) & +0.342 &  0.007351 & +4.6520e+01 &  3.302e-241 &  1.651e-241 \tabularnewline
Toeschouwers & +1.145e-05 &  5.922e-07 & +1.9340e+01 &  6.621e-70 &  3.31e-70 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=286889&T=2

[TABLE]
[ROW][C]Multiple Linear Regression - Ordinary Least Squares[/C][/ROW]
[ROW][C]Variable[/C][C]Parameter[/C][C]S.D.[/C][C]T-STATH0: parameter = 0[/C][C]2-tail p-value[/C][C]1-tail p-value[/C][/ROW]
[ROW][C](Intercept)[/C][C]+0.342[/C][C] 0.007351[/C][C]+4.6520e+01[/C][C] 3.302e-241[/C][C] 1.651e-241[/C][/ROW]
[ROW][C]Toeschouwers[/C][C]+1.145e-05[/C][C] 5.922e-07[/C][C]+1.9340e+01[/C][C] 6.621e-70[/C][C] 3.31e-70[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=286889&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=286889&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STATH0: parameter = 02-tail p-value1-tail p-value
(Intercept)+0.342 0.007351+4.6520e+01 3.302e-241 1.651e-241
Toeschouwers+1.145e-05 5.922e-07+1.9340e+01 6.621e-70 3.31e-70







Multiple Linear Regression - Regression Statistics
Multiple R 0.5427
R-squared 0.2945
Adjusted R-squared 0.2937
F-TEST (value) 374
F-TEST (DF numerator)1
F-TEST (DF denominator)896
p-value 0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation 0.1327
Sum Squared Residuals 15.77

\begin{tabular}{lllllllll}
\hline
Multiple Linear Regression - Regression Statistics \tabularnewline
Multiple R &  0.5427 \tabularnewline
R-squared &  0.2945 \tabularnewline
Adjusted R-squared &  0.2937 \tabularnewline
F-TEST (value) &  374 \tabularnewline
F-TEST (DF numerator) & 1 \tabularnewline
F-TEST (DF denominator) & 896 \tabularnewline
p-value &  0 \tabularnewline
Multiple Linear Regression - Residual Statistics \tabularnewline
Residual Standard Deviation &  0.1327 \tabularnewline
Sum Squared Residuals &  15.77 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=286889&T=3

[TABLE]
[ROW][C]Multiple Linear Regression - Regression Statistics[/C][/ROW]
[ROW][C]Multiple R[/C][C] 0.5427[/C][/ROW]
[ROW][C]R-squared[/C][C] 0.2945[/C][/ROW]
[ROW][C]Adjusted R-squared[/C][C] 0.2937[/C][/ROW]
[ROW][C]F-TEST (value)[/C][C] 374[/C][/ROW]
[ROW][C]F-TEST (DF numerator)[/C][C]1[/C][/ROW]
[ROW][C]F-TEST (DF denominator)[/C][C]896[/C][/ROW]
[ROW][C]p-value[/C][C] 0[/C][/ROW]
[ROW][C]Multiple Linear Regression - Residual Statistics[/C][/ROW]
[ROW][C]Residual Standard Deviation[/C][C] 0.1327[/C][/ROW]
[ROW][C]Sum Squared Residuals[/C][C] 15.77[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=286889&T=3

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=286889&T=3

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Multiple Linear Regression - Regression Statistics
Multiple R 0.5427
R-squared 0.2945
Adjusted R-squared 0.2937
F-TEST (value) 374
F-TEST (DF numerator)1
F-TEST (DF denominator)896
p-value 0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation 0.1327
Sum Squared Residuals 15.77



Parameters (Session):
par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
Parameters (R input):
par1 = ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par4 = ; par5 = ;
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
mywarning <- ''
par1 <- as.numeric(par1)
if(is.na(par1)) {
par1 <- 1
mywarning = 'Warning: you did not specify the column number of the endogenous series! The first column was selected by default.'
}
if (par4=='') par4 <- 0
par4 <- as.numeric(par4)
if (par5=='') par5 <- 0
par5 <- as.numeric(par5)
x <- na.omit(t(y))
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
(n <- n -1)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par3 == 'Seasonal Differences (s=12)'){
(n <- n - 12)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+12,j] - x[i,j]
}
}
x <- x2
}
if (par3 == 'First and Seasonal Differences (s=12)'){
(n <- n -1)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
(n <- n - 12)
x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep='')))
for (i in 1:n) {
for (j in 1:k) {
x2[i,j] <- x[i+12,j] - x[i,j]
}
}
x <- x2
}
if(par4 > 0) {
x2 <- array(0, dim=c(n-par4,par4), dimnames=list(1:(n-par4), paste(colnames(x)[par1],'(t-',1:par4,')',sep='')))
for (i in 1:(n-par4)) {
for (j in 1:par4) {
x2[i,j] <- x[i+par4-j,par1]
}
}
x <- cbind(x[(par4+1):n,], x2)
n <- n - par4
}
if(par5 > 0) {
x2 <- array(0, dim=c(n-par5*12,par5), dimnames=list(1:(n-par5*12), paste(colnames(x)[par1],'(t-',1:par5,'s)',sep='')))
for (i in 1:(n-par5*12)) {
for (j in 1:par5) {
x2[i,j] <- x[i+par5*12-j*12,par1]
}
}
x <- cbind(x[(par5*12+1):n,], x2)
n <- n - par5*12
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
(k <- length(x[n,]))
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
(k <- length(x[n,]))
head(x)
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, signif(mysum$coefficients[i,1],6), sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, mywarning)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,formatC(signif(mysum$coefficients[i,1],5),format='g',flag='+'))
a<-table.element(a,formatC(signif(mysum$coefficients[i,2],5),format='g',flag=' '))
a<-table.element(a,formatC(signif(mysum$coefficients[i,3],4),format='e',flag='+'))
a<-table.element(a,formatC(signif(mysum$coefficients[i,4],4),format='g',flag=' '))
a<-table.element(a,formatC(signif(mysum$coefficients[i,4]/2,4),format='g',flag=' '))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a,formatC(signif(sqrt(mysum$r.squared),6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a,formatC(signif(mysum$r.squared,6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a,formatC(signif(mysum$adj.r.squared,6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a,formatC(signif(mysum$fstatistic[1],6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, signif(mysum$fstatistic[2],6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, signif(mysum$fstatistic[3],6))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a,formatC(signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a,formatC(signif(mysum$sigma,6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a,formatC(signif(sum(myerror*myerror),6),format='g',flag=' '))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
if(n < 200) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,formatC(signif(x[i],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(x[i]-mysum$resid[i],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(mysum$resid[i],6),format='g',flag=' '))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,1],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,2],6),format='g',flag=' '))
a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,3],6),format='g',flag=' '))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,signif(numsignificant1,6))
a<-table.element(a,formatC(signif(numsignificant1/numgqtests,6),format='g',flag=' '))
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,signif(numsignificant5,6))
a<-table.element(a,signif(numsignificant5/numgqtests,6))
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,signif(numsignificant10,6))
a<-table.element(a,signif(numsignificant10/numgqtests,6))
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
}