Home » date » 2008 » Nov » 24 »

Multiple Lineair Regression q1 part2

*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: Mon, 24 Nov 2008 03:19:31 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p.htm/, Retrieved Mon, 24 Nov 2008 10:21:30 +0000
 
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/2008/Nov/24/t1227522090oxdzzao2tifj02p.htm/},
    year = {2008},
}
@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 = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
Multiple Lineair Regression
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1687 0 1508 0 1507 0 1385 0 1632 0 1511 0 1559 0 1630 0 1579 0 1653 0 2152 0 2148 0 1752 0 1765 0 1717 0 1558 0 1575 0 1520 0 1805 0 1800 0 1719 0 2008 0 2242 0 2478 0 2030 0 1655 0 1693 0 1623 0 1805 0 1746 0 1795 0 1926 0 1619 0 1992 0 2233 0 2192 0 2080 0 1768 0 1835 0 1569 0 1976 0 1853 0 1965 0 1689 0 1778 0 1976 0 2397 0 2654 0 2097 0 1963 0 1677 0 1941 0 2003 0 1813 0 2012 0 1912 0 2084 0 2080 0 2118 0 2150 0 1608 0 1503 0 1548 0 1382 0 1731 0 1798 0 1779 0 1887 0 2004 0 2077 0 2092 0 2051 0 1577 0 1356 0 1652 0 1382 0 1519 0 1421 0 1442 0 1543 0 1656 0 1561 0 1905 0 2199 0 1473 0 1655 0 1407 0 1395 0 1530 0 1309 0 1526 0 1327 0 1627 0 1748 0 1958 0 2274 0 1648 0 1401 0 1411 0 1403 0 1394 0 1520 0 1528 0 1643 0 1515 0 1685 0 2000 0 2215 0 1956 0 1462 0 1563 0 1459 0 1446 0 1622 0 1657 0 1638 0 1643 0 1683 0 2050 0 2262 0 1813 0 1445 0 1762 0 1461 0 1556 0 1431 0 1427 0 1554 0 1645 0 1653 0 2016 0 2207 0 1665 0 1361 0 1506 0 1360 0 1453 0 1522 0 1460 0 1552 0 1548 0 1827 0 1737 0 1941 0 1474 0 1458 0 1542 0 1404 0 1522 0 1385 0 1641 0 1510 0 1681 0 1938 0 1868 0 1726 0 1456 0 1445 0 1456 0 1365 0 1487 0 1558 0 1488 0 1684 0 1594 0 1850 0 1998 0 2079 0 1494 0 1057 1 1218 1 1168 1 1236 1 1076 1 1174 1 1139 1 1427 1 1487 1 1483 1 1513 1 1357 1 1165 1 1282 1 1110 1 1297 1 1185 1 1222 1 1284 1 1444 1 1575 1 1737 1 1763 1
 
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 time9 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
deaths[t] = + 1846.02995173260 -251.176611180784law[t] -1.50915849932545t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1846.0299517326038.7814347.600900
law-251.17661118078467.520939-3.720.0002630.000131
t-1.509158499325450.395585-3.8150.0001849.2e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.505523756005193
R-squared0.255554267885597
Adjusted R-squared0.247676535270630
F-TEST (value)32.4400789384574
F-TEST (DF numerator)2
F-TEST (DF denominator)189
p-value7.73048292046496e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation251.198646170456
Sum Squared Residuals11926043.6093574


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
116871844.52079323327-157.520793233273
215081843.01163473395-335.011634733953
315071841.50247623463-334.502476234628
413851839.99331773530-454.993317735302
516321838.48415923598-206.484159235977
615111836.97500073665-325.975000736652
715591835.46584223733-276.465842237326
816301833.956683738-203.956683738001
915791832.44752523868-253.447525238675
1016531830.93836673935-177.938366739350
1121521829.42920824002322.570791759976
1221481827.9200497407320.079950259301
1317521826.41089124137-74.4108912413734
1417651824.90173274205-59.901732742048
1517171823.39257424272-106.392574242722
1615581821.88341574340-263.883415743397
1715751820.37425724407-245.374257244072
1815201818.86509874475-298.865098744746
1918051817.35594024542-12.3559402454207
2018001815.84678174610-15.8467817460953
2117191814.33762324677-95.3376232467698
2220081812.82846474744195.171535252556
2322421811.31930624812430.680693751881
2424781809.81014774879668.189852251207
2520301808.30098924947221.699010750532
2616551806.79183075014-151.791830750143
2716931805.28267225082-112.282672250817
2816231803.77351375149-180.773513751492
2918051802.264355252172.73564474783382
3017461800.75519675284-54.7551967528407
3117951799.24603825352-4.24603825351528
3219261797.73687975419128.263120245810
3316191796.22772125486-177.227721254864
3419921794.71856275554197.281437244461
3522331793.20940425621439.790595743787
3621921791.70024575689400.299754243112
3720801790.19108725756289.808912742437
3817681788.68192875824-20.6819287582371
3918351787.1727702589147.8272297410883
4015691785.66361175959-216.663611759586
4119761784.15445326026191.845546739739
4218531782.6452947609470.3547052390647
4319651781.13613626161183.86386373839
4416891779.62697776228-90.6269777622844
4517781778.11781926296-0.117819262958949
4619761776.60866076363199.391339236366
4723971775.09950226431621.900497735692
4826541773.59034376498880.409656235017
4920971772.08118526566324.918814734343
5019631770.57202676633192.427973233668
5116771769.06286826701-92.0628682670062
5219411767.55370976768173.446290232319
5320031766.04455126836236.955448731645
5418131764.5353927690348.4646072309701
5520121763.02623426970248.973765730296
5619121761.51707577038150.482924229621
5720841760.00791727105323.992082728947
5820801758.49875877173321.501241228272
5921181756.98960027240361.010399727597
6021501755.48044177308394.519558226923
6116081753.97128327375-145.971283273752
6215031752.46212477443-249.462124774426
6315481750.9529662751-202.952966275101
6413821749.44380777578-367.443807775775
6517311747.93464927645-16.9346492764499
6617981746.4254907771251.5745092228755
6717791744.916332277834.083667722201
6818871743.40717377847143.592826221526
6920041741.89801527915262.101984720852
7020771740.38885677982336.611143220177
7120921738.87969828050353.120301719503
7220511737.37053978117313.629460218828
7315771735.86138128185-158.861381281846
7413561734.35222278252-378.352222782521
7516521732.84306428320-80.8430642831954
7613821731.33390578387-349.33390578387
7715191729.82474728454-210.824747284544
7814211728.31558878522-307.315588785219
7914421726.80643028589-284.806430285894
8015431725.29727178657-182.297271786568
8116561723.78811328724-67.7881132872427
8215611722.27895478792-161.278954787917
8319051720.76979628859184.230203711408
8421991719.26063778927479.739362210734
8514731717.75147928994-244.751479289941
8616551716.24232079062-61.2423207906154
8714071714.73316229129-307.73316229129
8813951713.22400379196-318.224003791964
8915301711.71484529264-181.714845292639
9013091710.20568679331-401.205686793314
9115261708.69652829399-182.696528293988
9213271707.18736979466-380.187369794663
9316271705.67821129534-78.6782112953373
9417481704.1690527960143.8309472039882
9519581702.65989429669255.340105703314
9622741701.15073579736572.849264202639
9716481699.64157729804-51.6415772980354
9814011698.13241879871-297.13241879871
9914111696.62326029938-285.623260299385
10014031695.11410180006-292.114101800059
10113941693.60494330073-299.604943300734
10215201692.09578480141-172.095784801408
10315281690.58662630208-162.586626302083
10416431689.07746780276-46.0774678027573
10515151687.56830930343-172.568309303432
10616851686.05915080411-1.05915080410638
10720001684.54999230478315.450007695219
10822151683.04083380546531.959166194545
10919561681.53167530613274.46832469387
11014621680.02251680680-218.022516806805
11115631678.51335830748-115.513358307479
11214591677.00419980815-218.004199808154
11314461675.49504130883-229.495041308828
11416221673.98588280950-51.9858828095028
11516571672.47672431018-15.4767243101773
11616381670.96756581085-32.9675658108519
11716431669.45840731153-26.4584073115264
11816831667.949248812215.0507511877990
11920501666.44009031288383.559909687125
12022621664.93093181355597.06906818645
12118131663.42177331422149.578226685775
12214451661.9126148149-216.912614814899
12317621660.40345631557101.596543684426
12414611658.89429781625-197.894297816248
12515561657.38513931692-101.385139316923
12614311655.87598081760-224.875980817597
12714271654.36682231827-227.366822318272
12815541652.85766381895-98.8576638189464
12916451651.34850531962-6.34850531962099
13016531649.839346820303.16065317970447
13120161648.33018832097367.66981167903
13222071646.82102982164560.178970178355
13316651645.3118713223219.6881286776808
13413611643.80271282299-282.802712822994
13515061642.29355432367-136.293554323668
13613601640.78439582434-280.784395824343
13714531639.27523732502-186.275237325017
13815221637.76607882569-115.766078825692
13914601636.25692032637-176.256920326366
14015521634.74776182704-82.747761827041
14115481633.23860332772-85.2386033277156
14218271631.72944482839195.27055517161
14317371630.22028632906106.779713670935
14419411628.71112782974312.288872170261
14514741627.20196933041-153.201969330414
14614581625.69281083109-167.692810831088
14715421624.18365233176-82.1836523317628
14814041622.67449383244-218.674493832437
14915221621.16533533311-99.165335333112
15013851619.65617683379-234.656176833787
15116411618.1470183344622.8529816655390
15215101616.63785983514-106.637859835136
15316811615.1287013358165.8712986641899
15419381613.61954283648324.380457163515
15518681612.11038433716255.889615662841
15617261610.60122583783115.398774162166
15714561609.09206733851-153.092067338508
15814451607.58290883918-162.582908839183
15914561606.07375033986-150.073750339857
16013651604.56459184053-239.564591840532
16114871603.05543334121-116.055433341207
16215581601.54627484188-43.5462748418811
16314881600.03711634256-112.037116342556
16416841598.5279578432385.4720421567698
16515941597.01879934390-3.01879934390471
16618501595.50964084458254.490359155421
16719981594.00048234525403.999517654746
16820791592.49132384593486.508676154072
16914941590.98216534660-96.9821653466029
17010571338.29639566649-281.296395666493
17112181336.78723716717-118.787237167168
17211681335.27807866784-167.278078667842
17312361333.76892016852-97.7689201685167
17410761332.25976166919-256.259761669191
17511741330.75060316987-156.750603169866
17611391329.24144467054-190.241444670540
17714271327.7322861712199.2677138287851
17814871326.22312767189160.776872328111
17914831324.71396917256158.286030827436
18015131323.20481067324189.795189326761
18113571321.6956521739135.3043478260869
18211651320.18649367459-155.186493674588
18312821318.67733517526-36.6773351752622
18411101317.16817667594-207.168176675937
18512971315.65901817661-18.6590181766113
18611851314.14985967729-129.149859677286
18712221312.64070117796-90.6407011779603
18812841311.13154267864-27.1315426786349
18914441309.62238417931134.377615820691
19015751308.11322567998266.886774320016
19117371306.60406718066430.395932819342
19217631305.09490868133457.905091318667


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.1593853120926010.3187706241852020.840614687907399
70.07600637656955880.1520127531391180.923993623430441
80.04209128045406930.08418256090813850.95790871954593
90.01706142320254100.03412284640508200.982938576797459
100.007893973203794910.01578794640758980.992106026796205
110.1905869838597960.3811739677195920.809413016140204
120.2418024138454650.483604827690930.758197586154535
130.2102276484375160.4204552968750320.789772351562484
140.1730494543778910.3460989087557820.826950545622109
150.1547568673787350.3095137347574710.845243132621265
160.2069900940943810.4139801881887620.793009905905619
170.2174969547816790.4349939095633590.78250304521832
180.2372136776881480.4744273553762950.762786322311852
190.1824028930306260.3648057860612510.817597106969374
200.1360465493486510.2720930986973020.863953450651349
210.1028045310619530.2056090621239070.897195468938047
220.09588825491445370.1917765098289070.904111745085546
230.1598935580231630.3197871160463260.840106441976837
240.3793752600865560.7587505201731130.620624739913444
250.3200817326252540.6401634652505080.679918267374746
260.3969189704069430.7938379408138860.603081029593057
270.4243416770455220.8486833540910440.575658322954478
280.4769655099948240.9539310199896480.523034490005176
290.4339278860663910.8678557721327820.566072113933609
300.4080012338138360.8160024676276730.591998766186164
310.3660913204662670.7321826409325330.633908679533733
320.3122932959252990.6245865918505990.687706704074701
330.3395742266290270.6791484532580540.660425773370973
340.2944044049801640.5888088099603280.705595595019836
350.3221875338005110.6443750676010210.67781246619949
360.3184096175413080.6368192350826170.681590382458692
370.2806193250121890.5612386500243790.71938067498781
380.2774719109635230.5549438219270470.722528089036477
390.2521793200135950.5043586400271910.747820679986405
400.3319822839290030.6639645678580050.668017716070997
410.2878528059642990.5757056119285980.712147194035701
420.2540985754814490.5081971509628980.745901424518551
430.2163168563666740.4326337127333470.783683143633326
440.2254761011533990.4509522023067970.774523898846602
450.2062667986108930.4125335972217850.793733201389107
460.1742991229881810.3485982459763610.82570087701182
470.2685125214419740.5370250428839480.731487478558026
480.5945221332447310.8109557335105390.405477866755269
490.5692586448316440.8614827103367130.430741355168356
500.5389174085287520.9221651829424960.461082591471248
510.5861957357969230.8276085284061540.413804264203077
520.5553102416384840.8893795167230320.444689758361516
530.524988467187630.950023065624740.47501153281237
540.5149947752308730.9700104495382540.485005224769127
550.4872246030543710.9744492061087420.512775396945629
560.4614582742124690.9229165484249390.538541725787531
570.4477875039883950.895575007976790.552212496011605
580.436728655406690.873457310813380.56327134459331
590.4382133422322660.8764266844645320.561786657767734
600.4541381777188430.9082763554376860.545861822281157
610.5402466192607860.9195067614784280.459753380739214
620.6623759711155740.6752480577688520.337624028884426
630.7288602032483290.5422795935033420.271139796751671
640.8423610011838640.3152779976322720.157638998816136
650.8327226168909010.3345547662181970.167277383109099
660.8157906067000140.3684187865999710.184209393299985
670.7985765673936170.4028468652127660.201423432606383
680.7793266168777580.4413467662444840.220673383122242
690.7745179270336110.4509641459327780.225482072966389
700.7890974527594440.4218050944811120.210902547240556
710.8114222539862290.3771554920275430.188577746013771
720.827454479919480.345091040161040.17254552008052
730.8452700191350230.3094599617299540.154729980864977
740.9079430187187460.1841139625625070.0920569812812535
750.9040582926355560.1918834147288890.0959417073644445
760.9346062831789220.1307874336421560.0653937168210781
770.9384104460807160.1231791078385680.0615895539192842
780.9505112749472970.0989774501054060.049488725052703
790.9570390574821930.08592188503561430.0429609425178071
800.9545771662455560.09084566750888870.0454228337544444
810.9463994549010720.1072010901978560.0536005450989279
820.9410551745100530.1178896509798940.058944825489947
830.9373308370371280.1253383259257440.062669162962872
840.968050864007150.06389827198570020.0319491359928501
850.9685421769734370.06291564605312580.0314578230265629
860.962308210286670.07538357942666040.0376917897133302
870.9661532379520170.06769352409596540.0338467620479827
880.9698167188095790.06036656238084290.0301832811904214
890.9658241618720950.06835167625581020.0341758381279051
900.9747386874750340.05052262504993290.0252613125249664
910.9709280969847610.05814380603047720.0290719030152386
920.9771753216021510.04564935679569730.0228246783978486
930.971280245541660.05743950891668180.0287197544583409
940.9644502613682330.0710994772635340.035549738631767
950.9669049512583180.06619009748336430.0330950487416821
960.991111669587070.01777666082586030.00888833041293016
970.9884799992085070.02304000158298560.0115200007914928
980.9887411631451650.02251767370967060.0112588368548353
990.9887185798442660.02256284031146770.0112814201557338
1000.9889056172963210.02218876540735750.0110943827036787
1010.9893750684709350.02124986305812930.0106249315290647
1020.987230398931820.02553920213635800.0127696010681790
1030.9846009238592930.03079815228141350.0153990761407067
1040.9800585245782780.03988295084344450.0199414754217223
1050.9766378150129810.04672436997403730.0233621849870186
1060.970199964603840.05960007079231950.0298000353961598
1070.9759433669314870.0481132661370260.024056633068513
1080.9926795833098640.01464083338027120.00732041669013562
1090.9942781327749640.01144373445007230.00572186722503613
1100.9933057594148810.01338848117023760.00669424058511882
1110.9912350554575540.01752988908489170.00876494454244584
1120.9898987357188220.02020252856235640.0101012642811782
1130.9887204150028050.02255916999438990.0112795849971950
1140.9851225101583730.02975497968325380.0148774898416269
1150.980577129541630.03884574091673840.0194228704583692
1160.9748485720092830.05030285598143420.0251514279907171
1170.967756910373690.06448617925262150.0322430896263107
1180.9594563717655610.0810872564688770.0405436282344385
1190.9757295920288250.048540815942350.024270407971175
1200.9968010845193330.006397830961333640.00319891548066682
1210.9969582502907870.006083499418426040.00304174970921302
1220.9961843069168310.007631386166337440.00381569308316872
1230.995918664508830.008162670982338550.00408133549116927
1240.9947526130578220.01049477388435550.00524738694217774
1250.9928982838970430.01420343220591380.00710171610295692
1260.991333335872310.01733332825538050.00866666412769027
1270.9896005427990270.02079891440194570.0103994572009729
1280.9861127429435840.02777451411283290.0138872570564164
1290.982020656649840.03595868670032060.0179793433501603
1300.977131578000350.04573684399930040.0228684219996502
1310.9901068206889540.01978635862209140.00989317931104568
1320.9995587380530520.0008825238938957360.000441261946947868
1330.9995260553163340.0009478893673329920.000473944683666496
1340.9993904727820380.001219054435924590.000609527217962293
1350.9991118115963530.001776376807294310.000888188403647153
1360.9988859527372980.002228094525404880.00111404726270244
1370.9984061570616750.003187685876649590.00159384293832480
1380.9976817890954670.004636421809065360.00231821090453268
1390.9967350922509180.006529815498163720.00326490774908186
1400.995344591408840.00931081718231830.00465540859115915
1410.9934118236416790.01317635271664220.00658817635832109
1420.995261473695620.009477052608759880.00473852630437994
1430.9955585899690930.008882820061813860.00444141003090693
1440.9989919566904270.002016086619145530.00100804330957277
1450.9984949275870330.00301014482593310.00150507241296655
1460.9977617011066070.004476597786786150.00223829889339307
1470.9968156404121610.006368719175677070.00318435958783853
1480.9955770706351250.008845858729749950.00442292936487497
1490.9935650932629410.01286981347411790.00643490673705897
1500.9918184307228720.01636313855425550.00818156927712775
1510.9892947373435240.02141052531295160.0107052626564758
1520.9847784716663610.03044305666727760.0152215283336388
1530.9812454086811580.03750918263768420.0187545913188421
1540.9925795916671910.01484081666561720.00742040833280862
1550.996723726044420.006552547911161980.00327627395558099
1560.9971475344975270.005704931004945720.00285246550247286
1570.9956287078785380.008742584242924920.00437129212146246
1580.993616898484010.01276620303198160.00638310151599079
1590.990975860666730.01804827866654160.00902413933327079
1600.9911320882884470.01773582342310650.00886791171155325
1610.9885673244927780.02286535101444390.0114326755072219
1620.9841713562263830.03165728754723410.0158286437736170
1630.9838495118020510.03230097639589770.0161504881979488
1640.9767366111690.0465267776620.023263388831
1650.9745301180874850.05093976382503080.0254698819125154
1660.9642727254811330.07145454903773320.0357272745188666
1670.9642838967144860.07143220657102850.0357161032855142
1680.9913236604357760.01735267912844790.00867633956422393
1690.9858502509560480.02829949808790480.0141497490439524
1700.9786678511722720.0426642976554560.021332148827728
1710.9680600037661360.06387999246772830.0319399962338641
1720.9509854113988010.09802917720239750.0490145886011987
1730.9290525995130610.1418948009738780.0709474004869388
1740.907327219143010.1853455617139790.0926727808569896
1750.8701903614332970.2596192771334070.129809638566703
1760.8373857084606360.3252285830787290.162614291539364
1770.8033167768258230.3933664463483530.196683223174177
1780.8085780638762390.3828438722475220.191421936123761
1790.8448142542883130.3103714914233750.155185745711687
1800.9484875957441520.1030248085116960.0515124042558481
1810.9803392969539750.03932140609204960.0196607030460248
1820.9694296769375470.06114064612490610.0305703230624530
1830.9880278283086960.02394434338260870.0119721716913044
1840.9703298177855150.05934036442896910.0296701822144845
1850.995665892695890.008668214608219240.00433410730410962
1860.9911569933542090.01768601329158250.00884300664579124


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level240.132596685082873NOK
5% type I error level750.414364640883978NOK
10% type I error level1010.558011049723757NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/10sqeg1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/10sqeg1227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/1lkja1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/1lkja1227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/2pmfd1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/2pmfd1227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/3nsgm1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/3nsgm1227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/43hl31227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/43hl31227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/5yyn71227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/5yyn71227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/6vfpo1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/6vfpo1227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/7cb7s1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/7cb7s1227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/8mwsj1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/8mwsj1227521953.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/9uduh1227521953.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/24/t1227522090oxdzzao2tifj02p/9uduh1227521953.ps (open in new window)


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