Home » date » 2010 » Nov » 30 »

Ws4

*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: Tue, 30 Nov 2010 12:22:03 +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/Nov/30/t1291121259mewe61pnsibgn2t.htm/, Retrieved Tue, 30 Nov 2010 13:47:50 +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/Nov/30/t1291121259mewe61pnsibgn2t.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:
Ws4
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13 14 13 3 25 55 147 12 8 13 5 158 7 71 10 12 16 6 0 0 0 9 7 12 6 143 10 0 10 10 11 5 67 74 43 12 7 12 3 0 0 0 13 16 18 8 148 138 8 12 11 11 4 28 0 0 12 14 14 4 114 113 34 6 6 9 4 0 0 0 5 16 14 6 123 115 103 12 11 12 6 145 9 0 11 16 11 5 113 114 73 14 12 12 4 152 59 159 14 7 13 6 0 0 0 12 13 11 4 36 114 113 12 11 12 6 0 0 0 11 15 16 6 8 102 44 11 7 9 4 108 0 0 7 9 11 4 112 86 0 9 7 13 2 51 17 41 11 14 15 7 43 45 74 11 15 10 5 120 123 0 12 7 11 4 13 24 0 12 15 13 6 55 5 0 11 17 16 6 103 123 32 11 15 15 7 127 136 126 8 14 14 5 14 4 154 9 14 14 6 135 76 129 12 8 14 4 38 99 98 10 8 8 4 11 98 82 10 14 13 7 43 67 45 12 14 15 7 141 92 8 8 8 13 4 62 13 0 12 11 11 4 62 24 129 11 16 15 6 135 129 31 12 10 15 6 117 117 117 7 8 9 5 82 11 99 11 14 13 6 145 20 55 11 16 16 7 87 91 132 12 13 13 6 76 111 58 9 5 11 3 124 0 0 15 8 12 3 151 58 0 11 10 12 4 131 0 0 11 8 12 6 127 146 101 11 13 14 7 76 129 31 11 15 14 5 25 48 147 15 6 8 4 0 0 0 11 12 13 5 58 111 132 12 16 16 6 115 32 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
liked[t] = + 6.89981578359029 + 0.097864463533243findingfriends[t] + 0.167368197229076knowingpeople[t] + 0.571325185382164celebrity[t] + 0.00243721157219217selectfbf[t] -0.00131784757087074selectsbf[t] + 0.00336547427871851`selecttbf `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.899815783590291.0641826.483700
findingfriends0.0978644635332430.0814631.20130.2315270.115764
knowingpeople0.1673681972290760.052263.20260.0016650.000833
celebrity0.5713251853821640.1236064.62218e-064e-06
selectfbf0.002437211572192170.0030140.80870.4199680.209984
selectsbf-0.001317847570870740.003026-0.43550.6638590.33193
`selecttbf `0.003365474278718510.0027831.20910.2285240.114262


Multiple Linear Regression - Regression Statistics
Multiple R0.599396383338163
R-squared0.35927602435887
Adjusted R-squared0.333475058896811
F-TEST (value)13.9249062166761
F-TEST (DF numerator)6
F-TEST (DF denominator)149
p-value1.54498636106837e-12
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.77612967854698
Sum Squared Residuals470.040858617294


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11312.71235751875480.287642481245227
21312.88456401993190.115435980068071
31613.31482989796462.68517010203537
41212.7154672274008-0.715467227400786
51112.6192561672017-1.61925616720165
61210.95974228273921.04025771726075
71815.62631459037902.37368540962098
81112.2687821810591-1.26878218105909
91412.94599631792291.05400368207712
10910.7765124896929-1.77651248969288
111413.98984877265220.0101512273477707
121213.6847256776321-1.68472567763207
131113.8816918719569-2.88169187195692
141213.3914509439414-1.39145094394135
151312.86944676595220.130553234047775
161112.8530802385107-1.85308023851071
171213.3431906278020-1.34319062780204
181613.94795706179742.05204293820256
19911.6964218543849-2.69642185438492
201111.5361143499040-0.536114349903987
211310.33470253366182.66529746633819
221514.61329799487840.386702005121559
231013.4738439052489-3.4738439052489
241111.5311228768590-0.531122876859011
251314.1401208153346-1.14012081533456
261614.44616806528091.55383193471906
271515.0404724977158-0.040472497715783
281413.4296447906240.570355209376008
291414.214715157704-0.214715157703995
301411.9903992748922.009600725108
31811.6763358944877-3.6763358944877
321314.3888421307032-1.38884213070320
331514.66594905426020.334050945739831
341311.44095291027211.55904708972789
351112.7541652147674-1.75416521476742
361514.34551807865810.654481921341931
371513.70054850933761.29945149066236
38912.2989755122997-3.29897551229975
391314.259570567836-1.25957056783599
401615.18984821841870.810151781581333
411313.9120715295458-0.91207152954582
421110.63362673263320.366373267366805
431211.71228765885860.287712341141435
441212.2545823122326-0.254582312232569
451213.2002545990534-1.20025459905342
461414.2709431895937-0.270943189593668
471413.83587209267760.164127907322432
48811.6572926614921-3.65729266149206
491313.2806889717270-0.280688971727048
501614.83209315876401.16790684123597
511312.63947351774510.360526482254932
521114.1509968986372-3.15099689863719
531413.59251517205570.407484827944284
541311.57697907658251.42302092341754
551313.2044663004113-0.204466300411272
561313.5644091448254-0.564409144825376
571212.5998424589847-0.599842458984685
581614.69460636452931.30539363547074
591510.93696049288474.0630395071153
601515.5013037913587-0.501303791358683
611211.12711047996830.872889520031678
621414.4305603414301-0.4305603414301
631214.4864606211227-2.48646062112272
641514.19174770977450.808252290225537
651212.0054050107979-0.005405010797859
661313.2998321688632-0.299832168863224
671214.1279522856312-2.12795228563121
681212.2949323677068-0.294932367706756
691314.0785196593001-1.07851965930009
70510.2389670051693-5.23896700516926
711313.4703508376377-0.470350837637678
721313.4021649515127-0.402164951512716
731413.20014878334880.799851216651212
741713.70409402276083.29590597723922
751313.8697255980051-0.869725598005064
761314.4908544275924-1.49085442759242
771213.7823222143317-1.78232221433172
781312.86342200579970.136577994200268
791412.28823527794811.71176472205187
801110.36484438288730.635155617112655
811211.64229760006970.357702399930296
821213.2433287040626-1.24332870406259
831613.99197718141292.00802281858713
841213.0861354465583-1.08613544655830
851210.59049498183381.40950501816622
861213.7982073841747-1.79820738417470
871011.6513627003967-1.65136270039666
881512.47194593897712.52805406102288
891515.2625530019638-0.262553001963804
901212.0114436106825-0.0114436106825331
911613.21578281403422.78421718596579
921513.97408945621251.02591054378752
931615.15210591162210.84789408837793
941314.6968684676904-1.6968684676904
951212.6175158882304-0.617515888230369
961111.9324079762809-0.932407976280935
971311.68229092953231.31770907046770
981011.1087881892885-1.10878818928852
991513.22115437516441.77884562483565
1001313.7695983318829-0.769598331882898
1011615.36509854263710.634901457362914
1021514.96966483269120.0303351673087509
1031814.58813131096443.41186868903559
1041310.52424054643582.47575945356424
1051010.2583143888960-0.258314388895981
1061614.99065775594371.00934224405633
1071311.39391846010621.60608153989381
1081515.4119168050792-0.411916805079173
1091411.73534982247952.2646501775205
1101511.41286293882483.58713706117522
1111413.13658863081550.863411369184523
1121314.5871194393257-1.58711943932573
1131313.1350473306006-0.135047330600562
1141514.09674660956690.903253390433103
1151614.63192615335861.36807384664139
1161414.3258520403142-0.325852040314200
1171414.0619134694722-0.0619134694722086
1181613.15006719714202.84993280285799
1191414.4556778137955-0.45567781379547
1201212.7073996499909-0.7073996499909
1211312.69212770599880.307872294001191
1221213.8202722473981-1.82027224739813
1231212.0772875551874-0.0772875551874363
1241414.4647687128416-0.46476871284163
1251414.3526471017900-0.352647101789961
1261411.93502445627452.0649755437255
1271615.21014959315760.78985040684242
1281314.4062231737777-1.40622317377767
1291412.88377973573791.11622026426210
130410.9722414167594-6.97224141675937
1311615.21543991107790.78456008892208
1321313.3575331365584-0.357533136558368
1331611.74474268522214.25525731477786
1341513.44105509133531.55894490866471
1351413.73720805147550.26279194852451
1361311.86583166797741.13416833202256
1371414.2497996829687-0.249799682968701
1381211.96395146611370.0360485338862988
1391514.12954577741080.870454222589154
1401413.47241481217240.527585187827579
1411313.0231492252456-0.023149225245558
1421414.0711827314672-0.071182731467205
1431613.23620259081062.76379740918944
144611.9077091725183-5.90770917251825
1451312.53116536228450.46883463771553
1461312.81078509378380.189214906216212
1471412.45742614179141.54257385820855
1481514.55916465738110.440835342618876
1491414.1153252590265-0.115325259026515
1501514.99271000668510.00728999331486742
1511313.9437068757845-0.94370687578452
1521614.65253473022351.34746526977655
1531211.64287082596720.357129174032826
1541513.70635407726101.29364592273898
1551214.1001307898994-2.10013078989944
1561411.47683471312292.52316528687711


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.6266056607596030.7467886784807940.373394339240397
110.4846369116986970.9692738233973940.515363088301303
120.5203468486641110.9593063026717770.479653151335889
130.7000571067524540.5998857864950910.299942893247546
140.6071914207047110.7856171585905780.392808579295289
150.5738229107136070.8523541785727860.426177089286393
160.5394734032700870.9210531934598250.460526596729913
170.565293736271260.8694125274574810.434706263728740
180.5328731639281640.9342536721436720.467126836071836
190.505881639492990.988236721014020.49411836050701
200.4387407882569060.8774815765138110.561259211743094
210.7043064302206370.5913871395587270.295693569779363
220.6358703227001540.7282593545996920.364129677299846
230.7650675552021120.4698648895957760.234932444797888
240.7081473195160.5837053609680.291852680484
250.6584419857661520.6831160284676970.341558014233848
260.6554886540030960.6890226919938080.344511345996904
270.590212803594490.8195743928110190.409787196405510
280.5258684736272530.9482630527454940.474131526372747
290.4595444189082090.9190888378164180.540455581091791
300.4505586751994230.9011173503988450.549441324800577
310.6766829805600750.646634038879850.323317019439925
320.6610304671362660.6779390657274680.338969532863734
330.6097201046938530.7805597906122940.390279895306147
340.6215154508534560.7569690982930870.378484549146544
350.5995846536861050.8008306926277890.400415346313895
360.5534303196918680.8931393606162650.446569680308132
370.5369038181173440.9261923637653120.463096181882656
380.6205379357987910.7589241284024170.379462064201209
390.5792858843678460.8414282312643090.420714115632154
400.5345184786192030.9309630427615950.465481521380797
410.4954853452242640.9909706904485290.504514654775736
420.4703058688085280.9406117376170570.529694131191472
430.4229901758855720.8459803517711440.577009824114428
440.3739709565156330.7479419130312650.626029043484367
450.3382133647752150.676426729550430.661786635224785
460.2913354220013950.582670844002790.708664577998605
470.2486367311766970.4972734623533930.751363268823303
480.3750487061153420.7500974122306850.624951293884658
490.3266400399781920.6532800799563850.673359960021808
500.3036785653972210.6073571307944420.696321434602779
510.2726315565492560.5452631130985110.727368443450744
520.3573339286183860.7146678572367730.642666071381614
530.3194727865729870.6389455731459740.680527213427013
540.3082080386009010.6164160772018010.691791961399099
550.2654552537034860.5309105074069710.734544746296514
560.2277578258043470.4555156516086930.772242174195653
570.1945660840942920.3891321681885830.805433915905708
580.1874525396207620.3749050792415230.812547460379238
590.3510293867604140.7020587735208270.648970613239586
600.3094881227659530.6189762455319060.690511877234047
610.2787825007194430.5575650014388860.721217499280557
620.2409954616561160.4819909233122310.759004538343884
630.2899894787517170.5799789575034350.710010521248283
640.2640498676685840.5280997353371680.735950132331416
650.2300964813530800.4601929627061610.76990351864692
660.1959130930386690.3918261860773380.804086906961331
670.2062093659423710.4124187318847420.793790634057629
680.1749274926483560.3498549852967110.825072507351644
690.1552603459305770.3105206918611540.844739654069423
700.4578045630315560.9156091260631120.542195436968444
710.4130079960529740.8260159921059480.586992003947026
720.3691888411143090.7383776822286170.630811158885692
730.3375799234306740.6751598468613480.662420076569326
740.4548555623514890.9097111247029780.545144437648511
750.4176798069924680.8353596139849360.582320193007532
760.4064434955345850.8128869910691690.593556504465415
770.4086629693899430.8173259387798870.591337030610056
780.3642661153509390.7285322307018770.635733884649061
790.3621552505565270.7243105011130550.637844749443472
800.326767341613170.653534683226340.67323265838683
810.2902871815030880.5805743630061760.709712818496912
820.2658286839551700.5316573679103410.73417131604483
830.2800048416101180.5600096832202350.719995158389882
840.2554154858796300.5108309717592610.74458451412037
850.241821853095620.483643706191240.75817814690438
860.2480676193543580.4961352387087160.751932380645642
870.2520035392186870.5040070784373730.747996460781313
880.2928762763121840.5857525526243680.707123723687816
890.2539436447708610.5078872895417210.74605635522914
900.2189107479041280.4378214958082570.781089252095872
910.2708815401628960.5417630803257930.729118459837104
920.2460808566615280.4921617133230560.753919143338472
930.2173936454491750.4347872908983490.782606354550825
940.2182480432594230.4364960865188460.781751956740577
950.1883995884139890.3767991768279790.81160041158601
960.1788384201006610.3576768402013220.821161579899339
970.1717554521915830.3435109043831660.828244547808417
980.1774187593922090.3548375187844180.822581240607791
990.2022079174076720.4044158348153450.797792082592328
1000.1930373262140670.3860746524281340.806962673785933
1010.1671108394509870.3342216789019740.832889160549013
1020.1383625979434100.2767251958868200.86163740205659
1030.1931306431702190.3862612863404390.80686935682978
1040.2078884102448120.4157768204896240.792111589755188
1050.1808592873577510.3617185747155010.81914071264225
1060.1561860601525690.3123721203051380.84381393984743
1070.1504612866375430.3009225732750860.849538713362457
1080.1232187862267580.2464375724535160.876781213773242
1090.1361453125613810.2722906251227620.86385468743862
1100.4218007027463040.8436014054926080.578199297253696
1110.3994845158471860.7989690316943730.600515484152814
1120.3776735768226690.7553471536453380.622326423177331
1130.3460217108979820.6920434217959650.653978289102018
1140.3052110554030910.6104221108061830.694788944596909
1150.2731195704945670.5462391409891350.726880429505433
1160.2327185368889010.4654370737778020.767281463111099
1170.1936617425544690.3873234851089370.806338257445531
1180.2341616203637070.4683232407274130.765838379636293
1190.2109824019260020.4219648038520040.789017598073998
1200.1759129203148090.3518258406296170.824087079685191
1210.1421435418467210.2842870836934420.857856458153279
1220.1304079702828290.2608159405656590.86959202971717
1230.1021180122794230.2042360245588450.897881987720577
1240.0920577234578290.1841154469156580.907942276542171
1250.07489508281497510.1497901656299500.925104917185025
1260.0803289797234290.1606579594468580.919671020276571
1270.06035652509836040.1207130501967210.93964347490164
1280.06705445921007450.1341089184201490.932945540789926
1290.09306505724185160.1861301144837030.906934942758148
1300.3543831287866140.7087662575732280.645616871213386
1310.305144483138020.610288966276040.69485551686198
1320.246415197660010.492830395320020.75358480233999
1330.4686048755605270.9372097511210540.531395124439473
1340.4410754679320210.8821509358640420.558924532067979
1350.3720449620220810.7440899240441620.62795503797792
1360.3305585381713010.6611170763426020.669441461828699
1370.2661051281187740.5322102562375470.733894871881226
1380.2005834785555360.4011669571110720.799416521444464
1390.1495473868872670.2990947737745340.850452613112733
1400.1079300596938190.2158601193876370.892069940306181
1410.07006605129973360.1401321025994670.929933948700266
1420.0424656113307760.0849312226615520.957534388669224
1430.03187073597952030.06374147195904070.96812926402048
1440.7189902726935810.5620194546128380.281009727306419
1450.5773325549946870.8453348900106260.422667445005313
1460.4271041583578890.8542083167157770.572895841642111


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 level20.0145985401459854OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/10xi3o1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/10xi3o1291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/1qz6d1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/1qz6d1291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/21r5x1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/21r5x1291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/31r5x1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/31r5x1291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/41r5x1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/41r5x1291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/5t04j1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/5t04j1291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/6t04j1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/6t04j1291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/7mr431291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/7mr431291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/8mr431291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/8mr431291119711.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/9xi3o1291119711.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291121259mewe61pnsibgn2t/9xi3o1291119711.ps (open in new window)


 
Parameters (Session):
par1 = 3 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 3 ; 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