Home » date » 2010 » Dec » 18 »

Multiple regression: FMPS

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sat, 18 Dec 2010 15:20:43 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b.htm/, Retrieved Sat, 18 Dec 2010 16:21:22 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
24 14 11 24 26 25 11 7 25 23 17 6 17 30 25 18 12 10 19 23 18 8 12 22 19 16 10 12 22 29 20 10 11 25 25 16 11 11 23 21 18 16 12 17 22 17 11 13 21 25 23 13 14 19 24 30 12 16 19 18 23 8 11 15 22 18 12 10 16 15 15 11 11 23 22 12 4 15 27 28 21 9 9 22 20 15 8 11 14 12 20 8 17 22 24 31 14 17 23 20 27 15 11 23 21 34 16 18 21 20 21 9 14 19 21 31 14 10 18 23 19 11 11 20 28 16 8 15 23 24 20 9 15 25 24 21 9 13 19 24 22 9 16 24 23 17 9 13 22 23 24 10 9 25 29 25 16 18 26 24 26 11 18 29 18 25 8 12 32 25 17 9 17 25 21 32 16 9 29 26 33 11 9 28 22 13 16 12 17 22 32 12 18 28 22 25 12 12 29 23 29 14 18 26 30 22 9 14 25 23 18 10 15 14 17 17 9 16 25 23 20 10 10 26 23 15 12 11 20 25 20 14 14 18 24 33 14 9 32 24 29 10 12 25 23 23 14 17 25 21 26 16 5 23 24 18 9 12 21 24 20 10 12 20 28 11 6 6 15 16 28 8 24 30 20 26 13 12 24 29 22 10 12 26 27 17 8 14 24 22 12 7 7 22 28 14 15 13 14 16 17 9 12 24 25 21 10 13 24 24 19 12 14 24 28 18 13 8 24 24 10 10 11 19 23 29 11 9 31 30 31 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 7.52338981352697 + 0.329234589786872CM[t] -0.360242862076528D[t] + 0.196436099966937PE[t] + 0.399119446996563O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.523389813526972.2142933.39760.0008650.000433
CM0.3292345897868720.0550515.980500
D-0.3602428620765280.105903-3.40160.0008530.000427
PE0.1964360999669370.0850462.30980.022230.011115
O0.3991194469965630.0705695.655800


Multiple Linear Regression - Regression Statistics
Multiple R0.605745939016341
R-squared0.366928142634789
Adjusted R-squared0.350484717768160
F-TEST (value)22.3145813971791
F-TEST (DF numerator)4
F-TEST (DF denominator)154
p-value1.50990331349021e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.39855285935688
Sum Squared Residuals1778.72487682780


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12422.91952262088731.08047737911266
22522.34638305604652.65361694395354
33024.27632054179665.72367945820337
41920.2708063653626-1.27080636536265
52220.50817222561641.49182777438363
62223.1204117918552-1.12041179185521
72522.64443626304952.35556373695049
82319.37077725383923.62922274616076
91718.8235876699938-1.82358766999384
102121.6893618315462-0.689361831546238
111922.7416002990848-3.74160029908479
121923.4046408076239-4.40464080762391
131523.1552674155735-8.15526741557349
141617.0778507893901-1.07785078939014
152319.44066211104893.55933788895107
162724.15511945807112.84488054192886
172220.94544427999621.05455572000378
181416.5301962273129-2.53019622731288
192224.1444191400076-2.14441914000762
202324.0080646672178-1.00806466721779
212321.55138629318871.44861370681128
222124.4717188123923-3.47171881239229
231922.3267442268275-3.32674422682747
241823.8303703084389-5.83037030843893
252023.1523171521758-3.1523171521758
262322.43460858092630.56539141907374
272523.39130407799721.60869592200278
281923.3276664678502-4.32766646785022
292423.84708991054130.152910089458663
302221.61160866170620.388391338293833
312525.1649802102494-0.164980210249377
322623.10508529229672.89491470770331
332922.84081751048686.15918248951317
343225.20753103610396.79246896389614
352521.59911416758083.40088583241921
362924.44004141509554.5599585849045
372824.97401252727883.02598747272125
381717.1774147210595-0.177414721059483
392826.05245997511781.94754002488222
402922.96832069380466.03167930619538
412627.5372260575766-1.53722605757662
422523.45421771060751.54578228939254
431419.578755907371-5.57875590737100
442522.20091696160702.79908303839302
452621.64976126908944.35023873091056
462020.2777775899621-0.277777589962093
471821.3936536676476-3.39365366764764
483224.69152283504237.3084771649577
492525.0057447771052-0.00574477710516708
502521.77330739591943.22669260408062
512320.88065058251342.11934941748661
522122.1435265985227-1.14352659852267
532024.0382307040061-4.03823070400614
541516.54804088047-1.54804088047002
553026.55687077008493.4431292299151
562425.3320291034943-1.33202910349435
572624.29758043658331.70241956341668
582421.76916817675312.23083182324693
592221.50290207210610.49709792789394
601415.6686115909104-1.66861159091044
612422.21341145573241.78658854426764
622422.96742360577371.03257639422631
632423.38138259000010.618617409999919
642419.91681075034884.08318924965119
651918.55385147118770.446148528812339
663126.85002974410384.14997025589623
672226.5873830278616-4.58738302786159
682721.47183894728685.52816105271322
691917.74569108919741.25430891080260
702522.2841934009732.71580659902702
712024.9978764644748-4.99787646447479
722121.4843334414122-0.484333441412164
732727.4818888698591-0.481888869859067
742324.3831470665241-1.38314706652415
752525.765831063715-0.765831063715015
762022.2320983443908-2.23209834439081
772119.29169488616921.70830511383083
782222.4433739815876-0.443373981587572
792322.99475763712890.0052423628711022
802524.11358397821210.88641602178786
812523.3822796780311.61772032196899
821723.8260579787784-6.82605797877844
831921.4486989876275-2.44869898762751
842523.94798304004071.05201695995932
851922.4000991781963-3.40009917819633
862023.1964890435980-3.19648904359797
872622.57455140583983.42544859416018
882320.76089745386142.23910254613858
892724.34264941603642.65735058396358
901720.9151599852433-3.91515998524332
911723.3690612063689-6.36906120636888
921920.1648769286661-1.16487692866605
931719.7761439478985-2.77614394789849
942222.0930526075082-0.0930526075081821
952123.4736834293323-2.47368342933229
963228.6294971973713.37050280262897
972124.6938678781467-3.69386787814674
982124.3053938966841-3.30539389668408
991821.2754028473198-3.27540284731985
1001821.3010609605777-3.30106096057775
1012322.82140664429160.178593355708382
1021920.6789502123254-1.67895021232541
1032020.9840929018925-0.98409290189246
1042122.2948388665069-1.29483886650688
1052023.7876463720903-3.78764637209027
1061718.8584432937121-1.85844329371212
1071820.30476490105-2.30476490104999
1081920.7232952142418-1.72329521424176
1092222.0389043755593-0.0389043755592504
1101518.8157193573635-3.81571935736346
1111418.861999276682-4.86199927668202
1121826.5818597583357-8.58185975833566
1132421.30568714207272.69431285792725
1143523.553434922009511.4465650779905
1152919.07628002980619.9237199701939
1162122.0417363809924-1.04173638099239
1172520.54447580440824.45552419559183
1182018.50890074969911.49109925030089
1192223.2362627165489-1.23626271654894
1201316.9054517371134-3.90545173711341
1212623.26420196819742.73579803180261
1221716.91314693924960.086853060750385
1232520.05652561223864.94347438776143
1242020.7365685384335-0.736568538433521
1251918.12346475259650.876535247403452
1262122.6645711067815-1.66457110678147
1272221.12319349130470.876806508695295
1282422.68331284796951.31668715203046
1292122.9743948303731-1.97439483037314
1302625.48351448197270.516485518027266
1312420.54169865150473.45830134849535
1321620.2876990779592-4.28769907795923
1332322.4160948027620.583905197238016
1341820.8568725341281-2.85687253412808
1351622.3718680588102-6.37186805881019
1362624.10968177425391.89031822574610
1371919.1060773622303-0.106077362230300
1382116.86892019529784.13107980470218
1392122.1745348708123-1.17453487081232
1402218.42741848639503.57258151360503
1412319.71262459571603.28737540428395
1422924.80468249564324.19531750435677
1432119.08728076851261.91271923148739
1442119.98759269558941.01240730441057
1452321.87420052541871.12579947458127
1462723.04697095167563.95302904832437
1472525.4101595306039-0.410159530603869
1482121.0090818901432-0.00908189014322001
1491017.0947435019867-7.09474350198672
1502022.6171022316943-2.6171022316943
1512622.52780650828943.4721934917106
1522423.69991686172340.300083138276562
1532931.7712548047923-2.77125480479230
1541919.0639037936453-0.0639037936452667
1552422.05652106569261.94347893430741
1561920.8133697677130-1.81336976771304
1572423.43822208604180.56177791395819
1582221.81056291527170.189437084728275
1591723.6804511429986-6.68045114299861


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.3139080917141120.6278161834282230.686091908285888
90.1841614278126750.3683228556253500.815838572187325
100.1130553529436600.2261107058873200.88694464705634
110.2283587238301820.4567174476603650.771641276169818
120.2097355375294440.4194710750588890.790264462470556
130.812750563044010.3744988739119820.187249436955991
140.741901221584330.5161975568313390.258098778415670
150.6934292933645960.6131414132708070.306570706635404
160.624765698855140.7504686022897190.375234301144860
170.5448750302891210.9102499394217580.455124969710879
180.5191207074845850.961758585030830.480879292515415
190.4541858701528100.9083717403056190.54581412984719
200.4518901138892690.9037802277785370.548109886110731
210.4385115940789550.877023188157910.561488405921045
220.375332957154660.750665914309320.62466704284534
230.3521444742226030.7042889484452050.647855525777397
240.3845171969956520.7690343939913040.615482803004348
250.4009645842360530.8019291684721060.599035415763947
260.3363075541879250.6726151083758500.663692445812075
270.2948533999227110.5897067998454230.705146600077289
280.3159163713876880.6318327427753760.684083628612312
290.2648563947020760.5297127894041510.735143605297924
300.2146343925614540.4292687851229080.785365607438546
310.1731248345810630.3462496691621260.826875165418937
320.1792230948792010.3584461897584010.8207769051208
330.3616514152175000.7233028304349990.6383485847825
340.597284553287450.80543089342510.40271544671255
350.5714756343198930.8570487313602130.428524365680107
360.6751960213332160.6496079573335670.324803978666784
370.6792342962224230.6415314075551540.320765703777577
380.6276168843639650.7447662312720690.372383115636035
390.5888638654763170.8222722690473660.411136134523683
400.685324884837860.6293502303242790.314675115162139
410.6559149041658250.688170191668350.344085095834175
420.6112675014925620.7774649970148770.388732498507438
430.6805324687434550.638935062513090.319467531256545
440.658320808988860.6833583820222790.341679191011140
450.6755128120301560.6489743759396880.324487187969844
460.629002581106140.741994837787720.37099741889386
470.6241382306382050.751723538723590.375861769361795
480.7543531086387810.4912937827224380.245646891361219
490.7170215406021410.5659569187957180.282978459397859
500.7199023626803140.5601952746393710.280097637319686
510.6889334763149360.6221330473701290.311066523685064
520.6536257039098320.6927485921803350.346374296090168
530.6894698921756140.6210602156487730.310530107824386
540.652947110155710.6941057796885790.347052889844290
550.6452342696842520.7095314606314960.354765730315748
560.6130217380065070.7739565239869860.386978261993493
570.5744163921600350.851167215679930.425583607839965
580.5442914777851670.9114170444296660.455708522214833
590.4972133445331110.9944266890662220.502786655466889
600.4577585747090840.9155171494181680.542241425290916
610.4215605161612580.8431210323225150.578439483838742
620.378756706609460.757513413218920.62124329339054
630.3357404043345520.6714808086691040.664259595665448
640.3565030417585160.7130060835170330.643496958241484
650.3142038268214760.6284076536429520.685796173178524
660.3287985415883610.6575970831767210.67120145841164
670.3867668311451410.7735336622902820.613233168854859
680.4603728953752590.9207457907505190.539627104624741
690.4202193247189610.8404386494379210.57978067528104
700.4036982099363780.8073964198727560.596301790063622
710.4615263336988830.9230526673977660.538473666301117
720.4174221075531760.8348442151063520.582577892446824
730.376388202165160.752776404330320.62361179783484
740.3406764626716550.681352925343310.659323537328345
750.3027085727465110.6054171454930220.69729142725349
760.2791002027885340.5582004055770680.720899797211466
770.2516808582502610.5033617165005210.748319141749739
780.2175397909762470.4350795819524950.782460209023753
790.1886463205691370.3772926411382750.811353679430863
800.1611091468813360.3222182937626730.838890853118664
810.1424323520344990.2848647040689990.8575676479655
820.2324122874239740.4648245748479490.767587712576026
830.2144873519118490.4289747038236990.78551264808815
840.1865021183951670.3730042367903330.813497881604833
850.1855638480539830.3711276961079660.814436151946017
860.1798146653377710.3596293306755430.820185334662229
870.1824097938072120.3648195876144250.817590206192788
880.1726396364314850.3452792728629710.827360363568515
890.1625854783913370.3251709567826730.837414521608663
900.1679485172136530.3358970344273060.832051482786347
910.2413346177427290.4826692354854570.758665382257271
920.208939437017610.417878874035220.79106056298239
930.1937059130684550.3874118261369090.806294086931545
940.1629837600889960.3259675201779920.837016239911004
950.1469299500326580.2938599000653170.853070049967342
960.1512565387787940.3025130775575880.848743461221206
970.1520818603666670.3041637207333340.847918139633333
980.1470471614937480.2940943229874960.852952838506252
990.1413812058889160.2827624117778330.858618794111084
1000.1374123106934850.274824621386970.862587689306515
1010.1129493862292470.2258987724584930.887050613770753
1020.0951192746138270.1902385492276540.904880725386173
1030.07751926247706020.1550385249541200.92248073752294
1040.0628759439158770.1257518878317540.937124056084123
1050.06378982118625560.1275796423725110.936210178813744
1060.05512375736449630.1102475147289930.944876242635504
1070.04900256143945770.09800512287891540.950997438560542
1080.04210382206667690.08420764413335390.957896177933323
1090.03216707000545520.06433414001091040.967832929994545
1100.03342374925366410.06684749850732820.966576250746336
1110.0438751320731190.0877502641462380.956124867926881
1120.1444531782327420.2889063564654830.855546821767258
1130.1291921546900020.2583843093800040.870807845309998
1140.5383941117879160.9232117764241670.461605888212084
1150.8881383640296250.2237232719407500.111861635970375
1160.860926828122010.2781463437559800.139073171877990
1170.902391891343910.1952162173121810.0976081086560904
1180.8813917456595750.237216508680850.118608254340425
1190.8582848912813520.2834302174372950.141715108718648
1200.8946151138125260.2107697723749480.105384886187474
1210.876551863368120.2468962732637590.123448136631879
1220.8444905772810670.3110188454378670.155509422718933
1230.8716040453751320.2567919092497360.128395954624868
1240.8379218617318350.3241562765363290.162078138268165
1250.805995319940010.3880093601199820.194004680059991
1260.7654956532616830.4690086934766340.234504346738317
1270.7341033674018640.5317932651962720.265896632598136
1280.6982873047903420.6034253904193160.301712695209658
1290.6458338385204590.7083323229590830.354166161479541
1300.5868805108319110.8262389783361780.413119489168089
1310.5868173448325920.8263653103348160.413182655167408
1320.5892290452670820.8215419094658350.410770954732918
1330.5418716415496750.916256716900650.458128358450325
1340.4951583909078840.9903167818157670.504841609092116
1350.6494415117585490.7011169764829030.350558488241451
1360.6129078704883380.7741842590233250.387092129511662
1370.5456550760544740.9086898478910520.454344923945526
1380.5499021659557740.9001956680884510.450097834044226
1390.4755499765711050.951099953142210.524450023428895
1400.4544752196997180.9089504393994360.545524780300282
1410.4248783355204430.8497566710408870.575121664479556
1420.4910658172823130.9821316345646260.508934182717687
1430.6166835738472950.7666328523054110.383316426152705
1440.5420838816010010.9158322367979980.457916118398999
1450.4669314031957750.933862806391550.533068596804225
1460.4922739389495240.9845478778990490.507726061050476
1470.4387784444561330.8775568889122660.561221555543867
1480.3274732813497750.654946562699550.672526718650225
1490.5615402256452440.8769195487095130.438459774354756
1500.5396036457095710.9207927085808580.460396354290429
1510.4008117790713500.8016235581426990.59918822092865


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level50.0347222222222222OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/10iqg51292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/10iqg51292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/1mgjw1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/1mgjw1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/2mgjw1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/2mgjw1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/3mgjw1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/3mgjw1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/4mgjw1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/4mgjw1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/5mgjw1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/5mgjw1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/6x7ih1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/6x7ih1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/7pyhk1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/7pyhk1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/8pyhk1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/8pyhk1292685631.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/9pyhk1292685631.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292685671hr33jn7fymtk30b/9pyhk1292685631.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 4 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- 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'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
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[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
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, mysum$coefficients[i,1], 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.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/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<br />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,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
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, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
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, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
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<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />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,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
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,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
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,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
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,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
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,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
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')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by