Home » date » 2010 » Dec » 19 »

MR - Cannotdo verklaren

*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: Sun, 19 Dec 2010 18:20:33 +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/19/t1292782741mg8rwyt8h7o28kd.htm/, Retrieved Sun, 19 Dec 2010 19:19:04 +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/19/t1292782741mg8rwyt8h7o28kd.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 «
0 1 4 4 2 0 1 2 2 2 0 1 5 5 4 1 1 4 5 3 0 2 1 1 2 0 1 2 4 1 0 4 5 6 4 0 1 1 5 3 0 1 3 4 1 0 2 5 5 4 1 1 2 7 4 0 1 2 2 4 1 2 2 7 3 0 1 2 5 4 0 1 1 5 1 1 1 4 7 4 1 1 3 3 1 0 1 6 6 4 1 1 1 2 4 0 2 3 6 3 1 1 2 1 2 0 2 5 5 6 0 1 5 4 5 0 2 3 4 4 1 1 3 7 6 0 1 5 7 1 1 1 5 5 2 0 2 4 6 4 1 1 2 5 4 0 1 1 1 1 1 2 4 6 2 0 1 6 4 1 0 1 2 2 2 1 1 3 2 2 1 1 2 6 2 1 2 4 6 6 1 1 2 6 2 0 1 1 1 1 1 1 5 6 4 1 1 5 6 3 0 1 1 1 3 1 1 1 1 1 1 1 2 7 4 0 1 4 2 3 0 1 5 3 4 0 1 3 5 3 0 1 3 3 2 1 1 1 4 1 0 1 2 2 5 1 1 3 3 4 1 2 2 7 1 0 2 5 7 2 1 1 4 5 4 0 1 4 1 3 0 1 2 2 2 0 2 3 5 3 1 1 6 2 3 0 1 2 4 2 1 2 3 7 2 1 1 2 2 4 0 1 5 5 4 0 1 5 6 2 0 1 5 3 2 1 1 6 7 5 0 2 4 4 4 1 1 2 3 5 0 1 5 5 5 1 2 2 3 2 1 1 1 2 3 0 1 6 6 4 0 1 6 6 2 1 1 3 5 2 1 1 4 2 2 0 3 5 3 5 0 2 2 4 2 0 2 4 6 3 1 1 3 5 2 1 1 2 2 2 1 1 2 5 2 1 1 3 2 2 0 1 3 1 2 1 1 7 2 1 0 1 2 4 3 0 1 2 5 3 1 1 2 5 3 0 1 5 3 3 0 1 1 2 1 0 3 5 7 4 0 1 2 1 1 0 1 1 5 1 0 1 2 5 1 0 1 2 2 3 0 1 0 6 2 0 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Cannotdo[t] = + 1.31587394220932 -0.0645747954209116Gender[t] + 0.365174200689959Depressed[t] + 0.173533918158284Worrytoomuch[t] + 0.270908114989842Limitactivity[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.315873942209320.4299213.06070.0026250.001313
Gender-0.06457479542091160.258578-0.24970.8031440.401572
Depressed0.3651742006899590.2262931.61370.1087310.054366
Worrytoomuch0.1735339181582840.0754712.29930.0228940.011447
Limitactivity0.2709081149898420.0983872.75350.0066410.00332


Multiple Linear Regression - Regression Statistics
Multiple R0.375533136675947
R-squared0.141025136741675
Adjusted R-squared0.117651671074782
F-TEST (value)6.03355697231615
F-TEST (DF numerator)4
F-TEST (DF denominator)147
p-value0.000159641632979213
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.5383513758478
Sum Squared Residuals347.879168469205


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
142.917000045512091.08299995448791
222.56993220919553-0.569932209195526
353.632350193650061.36764980634994
443.296867283239310.703132716760691
512.7615724917272-1.7615724917272
622.64609193052225-0.646091930522252
754.901406713878220.0985932861217778
813.36144207866022-2.36144207866022
932.646091930522250.353908069477748
1053.997524394340021.00247560565998
1123.91484323454572-1.91484323454572
1223.11174843917521-1.11174843917521
1324.00910932024583-2.00910932024583
1423.63235019365006-1.63235019365006
1512.81962584868054-1.81962584868054
1643.914843234545720.0851567654542813
1732.407983216943060.592016783056944
1863.805884111808352.19411588819165
1913.0471736437543-2.0471736437543
2033.90015019750846-0.900150197508463
2122.33182349561633-0.33182349561633
2254.539340624319710.460659375680295
2353.729724390481621.27027560951838
2433.82399047618174-0.823990476181737
2534.4566594645254-1.4566594645254
2653.16669368499711.8333063150029
2753.025959168249471.97404083175053
2844.1710583124983-0.171058312498305
2923.56777539822915-1.56777539822915
3012.1254901760474-1.1254901760474
3143.564667287097710.435332712902291
3262.646091930522253.35390806947775
3322.56993220919553-0.569932209195526
3432.505357413774610.494642586225386
3523.19949308640775-1.19949308640775
3644.64829974705708-0.648299747057078
3723.19949308640775-1.19949308640775
3812.1254901760474-1.1254901760474
3953.741309316387431.25869068361257
4053.470401201397591.52959879860241
4112.66730640602708-1.66730640602708
4212.06091538062649-1.06091538062649
4323.91484323454572-1.91484323454572
4442.840840324185371.15915967581463
4553.285282357333491.71471764266651
4633.36144207866022-0.36144207866022
4732.743466127353810.25653387264619
4812.58151713510134-1.58151713510134
4923.38265655416505-1.38265655416505
5033.22070756191258-0.220707561912583
5123.46729309026615-1.46729309026615
5253.80277600067691.1972239993231
5343.567775398229150.432224601770849
5442.667306406027081.33269359397292
5522.56993220919553-0.569932209195526
5633.72661627935018-0.726616279350179
5762.776265528764463.22373447123554
5822.91700004551209-0.917000045512094
5933.73820120525599-0.738201205255993
6023.0471736437543-1.0471736437543
6153.632350193650061.36764980634994
6253.264067881828661.73593211817134
6352.743466127353812.25653387264619
6464.185751349535561.81424865046444
6543.823990476181740.176009523818263
6623.49161567690243-1.49161567690243
6753.90325830863991.0967416913601
6823.04406553262286-1.04406553262286
6912.77626552876446-1.77626552876446
7063.805884111808352.19411588819165
7163.264067881828662.73593211817134
7233.02595916824947-0.0259591682494662
7342.505357413774611.49464258622539
7454.286538873703250.713461126296746
7523.28217424620205-1.28217424620205
7643.900150197508460.0998498024915373
7733.02595916824947-0.0259591682494662
7822.50535741377461-0.505357413774614
7923.02595916824947-1.02595916824947
8032.505357413774610.494642586225386
8132.396398291037240.603601708962758
8272.234449298784774.76555070121523
8323.18790816050194-1.18790816050194
8423.36144207866022-1.36144207866022
8523.29686728323931-1.29686728323931
8653.014374242343651.98562575765635
8712.29902409420568-1.29902409420568
8854.709766431346550.290233568653452
8922.1254901760474-0.1254901760474
9012.81962584868054-1.81962584868054
9122.81962584868054-0.819625848680536
9222.84084032418537-0.840840324185368
9303.26406788182866-3.26406788182866
9452.840840324185372.15915967581463
9533.9032583086399-0.903258308639905
9623.01437424234365-1.01437424234365
9742.67889133193291.3211086680671
9823.02595916824947-1.02595916824947
9923.36144207866022-1.36144207866022
10043.932949598919110.0670504010808907
10113.80588411180835-2.80588411180835
10253.296867283239311.70313271676069
10343.090533963670380.909466036329622
10463.835575402087552.16442459791245
10522.84084032418537-0.840840324185368
10653.932949598919111.06705040108089
10713.39113336893942-2.39113336893942
10873.939471037386693.06052896261331
10953.455708164360341.54429183563966
11033.62924208251862-0.62924208251862
11143.805884111808350.194115888191654
11243.491615676902430.508384323097575
11322.20164989737413-0.201649897374125
11412.40798321694306-1.40798321694306
11564.174166423629751.82583357637025
11642.819625848680541.18037415131946
11722.56993220919553-0.569932209195526
11872.837732213053934.16226778694607
11943.285282357333490.714717642666506
12043.264067881828660.735932118171338
12143.632350193650060.367649806349938
12222.29902409420568-0.299024094205684
12353.458816275491781.54118372450822
12432.776265528764460.223734471235544
12522.29902409420568-0.299024094205684
12633.09053396367038-0.0905339636703779
12743.90325830863990.0967416913600956
12853.488507565770981.51149243422902
12963.391133368939422.60886663106058
13022.39639829103724-0.396398291037242
13123.56777539822915-1.56777539822915
13223.56777539822915-1.56777539822915
13323.63235019365006-1.63235019365006
13424.83683191845731-2.83683191845731
13553.567775398229151.43222460177085
13623.99752439434002-1.99752439434002
13733.26406788182866-0.264067881828662
13863.567775398229152.43222460177085
13943.090533963670380.909466036329622
14053.373027004566031.62697299543397
14112.1254901760474-1.1254901760474
14222.94979944692274-0.94979944692274
14323.09053396367038-1.09053396367038
14422.81962584868054-0.819625848680536
14563.470401201397592.52959879860241
14623.12333336508102-1.12333336508102
14722.56993220919553-0.569932209195526
14814.09489859117158-3.09489859117158
14953.025959168249471.97404083175053
15033.9032583086399-0.903258308639905
15164.362698595029981.63730140497002
15212.81962584868054-1.81962584868054


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.73069308614050.5386138277190.2693069138595
90.6139908118872160.7720183762255670.386009188112784
100.5110376448240820.9779247103518350.488962355175918
110.6326786662068830.7346426675862350.367321333793117
120.5346253082466770.9307493835066460.465374691753323
130.4988948588090340.9977897176180680.501105141190966
140.4960605463628320.9921210927256640.503939453637168
150.4841830188453360.9683660376906720.515816981154664
160.4218982483460630.8437964966921260.578101751653937
170.401465480533760.802930961067520.59853451946624
180.5308426617745130.9383146764509740.469157338225487
190.4991824099572460.9983648199144930.500817590042754
200.4401226377522810.8802452755045620.559877362247719
210.3846753369454150.7693506738908310.615324663054585
220.3239446378569040.6478892757138080.676055362143096
230.3007309862949660.6014619725899330.699269013705034
240.2508082663552620.5016165327105240.749191733644738
250.232623410306390.465246820612780.76737658969361
260.253550572870050.50710114574010.74644942712995
270.350049419566380.7000988391327590.64995058043362
280.2903714232618240.5807428465236470.709628576738176
290.2653841041263370.5307682082526740.734615895873663
300.228453180965480.456906361930960.77154681903452
310.1947761246416920.3895522492833840.805223875358308
320.3730502809546910.7461005619093830.626949719045309
330.3203435823900340.6406871647800680.679656417609966
340.2973613037811880.5947226075623770.702638696218812
350.2780071738273630.5560143476547250.721992826172637
360.2355829199539950.4711658399079890.764417080046005
370.2152914128756780.4305828257513550.784708587124322
380.1913386592401810.3826773184803620.80866134075982
390.1951559029670770.3903118059341550.804844097032923
400.2024733275925220.4049466551850440.797526672407478
410.1897771133485240.3795542266970490.810222886651475
420.1602128847073820.3204257694147640.839787115292618
430.1800657804669730.3601315609339450.819934219533027
440.1792802638315530.3585605276631070.820719736168447
450.2004909964583960.4009819929167920.799509003541604
460.1691266837244730.3382533674489460.830873316275527
470.1382560942292120.2765121884584250.861743905770788
480.1325335200549870.2650670401099740.867466479945013
490.1208239864544490.2416479729088990.87917601354555
500.1004225707809210.2008451415618420.899577429219079
510.09502502284411360.1900500456882270.904974977155886
520.08419904348119810.1683980869623960.915800956518802
530.0711530422786190.1423060845572380.928846957721381
540.07265836894186910.1453167378837380.927341631058131
550.05839751233146880.1167950246629380.941602487668531
560.04756615848504370.09513231697008730.952433841514956
570.1448621751603610.2897243503207220.855137824839639
580.1287648784163820.2575297568327640.871235121583618
590.1080036893966860.2160073787933730.891996310603314
600.09324695490976220.1864939098195240.906753045090238
610.08736005956815770.1747201191363150.912639940431842
620.0887115940325290.1774231880650580.911288405967471
630.1125349027846660.2250698055693310.887465097215334
640.1227653245114840.2455306490229680.877234675488516
650.1005514491743870.2011028983487740.899448550825613
660.09647116773502530.1929423354700510.903528832264975
670.08422368653220210.1684473730644040.915776313467798
680.07336760138833170.1467352027766630.926632398611668
690.07713486954706430.1542697390941290.922865130452936
700.09266273314440970.1853254662888190.90733726685559
710.1395277097924360.2790554195848720.860472290207564
720.1149991143406650.229998228681330.885000885659335
730.1242063441735490.2484126883470980.875793655826451
740.114478091633720.228956183267440.88552190836628
750.1075079934509250.215015986901850.892492006549075
760.08761219637222380.1752243927444480.912387803627776
770.07032858691990610.1406571738398120.929671413080094
780.05961467884597310.1192293576919460.940385321154027
790.05284093313996870.1056818662799370.947159066860031
800.04476204328838280.08952408657676550.955237956711617
810.03561256314824780.07122512629649560.964387436851752
820.218629183149870.4372583662997390.78137081685013
830.2080146874578070.4160293749156150.791985312542193
840.2035111304990380.4070222609980760.796488869500962
850.1960264871549420.3920529743098850.803973512845058
860.2165160520310890.4330321040621780.783483947968911
870.2092142554526440.4184285109052880.790785744547356
880.1790674223120090.3581348446240170.820932577687991
890.1498240980062630.2996481960125250.850175901993737
900.1619783184312150.323956636862430.838021681568785
910.1420232750180470.2840465500360950.857976724981953
920.1244459558885670.2488919117771340.875554044111433
930.2244075256795990.4488150513591990.7755924743204
940.2583302877653180.5166605755306360.741669712234682
950.2316332294543590.4632664589087180.768366770545641
960.2098054020527210.4196108041054420.79019459794728
970.1959508552886720.3919017105773440.804049144711328
980.1813673222051960.3627346444103920.818632677794804
990.1726572352241580.3453144704483150.827342764775842
1000.1443157476064180.2886314952128370.855684252393582
1010.2167431645944650.4334863291889310.783256835405535
1020.2152109631726540.4304219263453080.784789036827346
1030.1899640452533830.3799280905067670.810035954746617
1040.2113680803111820.4227361606223640.788631919688818
1050.1857465380926210.3714930761852410.814253461907379
1060.1644404834823940.3288809669647890.835559516517606
1070.2208481988882460.4416963977764910.779151801111754
1080.3788515884617910.7577031769235810.62114841153821
1090.378579340903430.757158681806860.62142065909657
1100.3381330059275750.676266011855150.661866994072425
1110.2903866638145210.5807733276290430.709613336185479
1120.2512655623927140.5025311247854280.748734437607286
1130.211201682861120.4224033657222390.78879831713888
1140.2229650229770740.4459300459541480.777034977022926
1150.2837595270186090.5675190540372170.716240472981391
1160.2506949680023920.5013899360047850.749305031997608
1170.2104548424875630.4209096849751260.789545157512437
1180.5786510649569780.8426978700860440.421348935043022
1190.5685788322391120.8628423355217760.431421167760888
1200.5181547682739860.9636904634520280.481845231726014
1210.4745059349703390.9490118699406790.52549406502966
1220.4145034925167270.8290069850334540.585496507483273
1230.4937195357534980.9874390715069960.506280464246502
1240.4306607391256890.8613214782513790.569339260874311
1250.3703067859243910.7406135718487830.629693214075609
1260.3103088620702520.6206177241405050.689691137929748
1270.2922208232625740.5844416465251470.707779176737426
1280.281192420037260.562384840074520.71880757996274
1290.3500393785484350.700078757096870.649960621451565
1300.3146295766123840.6292591532247680.685370423387616
1310.3363085339941560.6726170679883120.663691466005844
1320.3951190345962150.790238069192430.604880965403785
1330.3686134027807250.737226805561450.631386597219275
1340.6212877244014560.7574245511970890.378712275598544
1350.5588627962364780.8822744075270450.441137203763522
1360.5707116722827260.8585766554345480.429288327717274
1370.4777468182524170.9554936365048340.522253181747583
1380.544393133283150.9112137334336990.455606866716849
1390.5478278287836470.9043443424327060.452172171216353
1400.4450208943343020.8900417886686040.554979105665698
1410.3801102359286740.7602204718573480.619889764071326
1420.2974004027264620.5948008054529250.702599597273538
1430.1937478388117730.3874956776235470.806252161188227
1440.1106742394879890.2213484789759770.889325760512011


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 level30.0218978102189781OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/10hfrc1292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/10hfrc1292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/15anu1292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/15anu1292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/2xkmf1292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/2xkmf1292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/3xkmf1292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/3xkmf1292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/4xkmf1292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/4xkmf1292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/5xkmf1292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/5xkmf1292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/6qtli1292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/6qtli1292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/712331292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/712331292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/812331292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/812331292782822.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/912331292782822.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292782741mg8rwyt8h7o28kd/912331292782822.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