Home » date » 2010 » Dec » 14 »

*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, 14 Dec 2010 17:29:37 +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/14/t129234768429ubdgrhbbcjj49.htm/, Retrieved Tue, 14 Dec 2010 18:28:15 +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/14/t129234768429ubdgrhbbcjj49.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 «
2 73 69 1 58 53 1 68 43 2 69 60 1 62 49 1 68 62 1 65 45 1 65 50 1 81 75 1 73 82 2 64 60 1 68 59 1 51 21 1 68 40 1 61 62 2 77 54 1 69 47 1 73 59 2 61 37 2 62 43 1 63 48 1 69 59 2 47 79 2 66 62 1 58 16 2 63 38 1 69 58 2 59 60 1 59 72 2 63 67 2 65 55 1 65 47 2 71 59 1 60 49 2 66 47 1 67 57 2 81 39 1 62 49 1 63 26 2 73 53 2 55 75 1 59 65 1 64 49 2 63 48 2 74 45 2 67 31 1 64 67 1 73 61 1 54 49 1 76 69 2 74 54 2 63 80 2 73 57 2 67 34 2 68 69 1 66 44 2 62 70 2 71 51 1 68 66 1 63 18 1 75 74 1 77 59 2 62 48 1 74 55 2 67 44 2 56 56 2 60 65 2 58 77 1 65 46 2 49 70 1 61 39 2 66 55 2 64 44 2 65 45 1 46 45 2 81 25 2 65 49 1 72 65 2 65 45 2 74 71 1 69 48 1 59 41 2 58 40 1 71 64 2 79 56 2 68 52 1 66 41 2 62 45 1 69 49 1 60 42 2 63 54 1 62 40 1 61 40 2 65 51 1 64 48 2 67 80 2 56 38 2 56 57 1 48 28 1 74 51 1 69 46 1 62 58 1 73 67 1 64 72 1 57 26 1 57 54 2 60 53 2 61 69 1 72 64 1 57 47 1 51 43 1 63 66 1 54 54 1 72 62 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
Nonverbal[t] = + 57.5799653413098 + 0.680297709218542Gender[t] + 0.117226208142543Anxiety[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)57.57996534130982.62245121.956500
Gender0.6802977092185421.158720.58710.5579510.278976
Anxiety0.1172262081425430.0422482.77470.0061790.00309


Multiple Linear Regression - Regression Statistics
Multiple R0.225398005717431
R-squared0.050804260981395
Adjusted R-squared0.0390130095650149
F-TEST (value)4.30864029502574
F-TEST (DF numerator)2
F-TEST (DF denominator)161
p-value0.0150362759913250
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation7.19587115061747
Sum Squared Residuals8336.67042022248


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
17367.02916912158175.97083087841833
25864.473252082083-6.47325208208304
36863.30099000065764.69900999934241
46965.97413324829943.02586675170064
56264.0043472495128-2.00434724951285
66865.52828795536592.47171204463409
76563.53544241694271.46455758305732
86564.12157345765540.878426542344606
98167.05222866121913.9477713387810
107367.87281211821685.12718788178324
116465.9741332482994-1.97413324829936
126865.17660933093832.82339066906172
135160.7220134215217-9.72201342152166
146862.949311376235.05068862377003
156165.5282879553659-4.52828795536591
167765.270775999444111.7292240005559
176963.76989483322785.23010516677223
187365.17660933093837.82339066906172
196163.2779304610209-2.27793046102088
206263.9812877098761-1.98128770987613
216363.8871210413703-0.887121041370309
226965.17660933093833.82339066906172
234768.2014312030077-21.2014312030077
246666.2085856645844-0.208585664584444
255860.1358823808089-2.13588238080894
266363.3951566691634-0.395156669163421
276965.05938312279573.94061687720426
285965.9741332482994-6.97413324829936
295966.7005500367913-7.70055003679133
306366.7947167052972-3.79471670529716
316565.3880022075867-0.388002207586646
326563.76989483322781.23010516677223
337165.85690704015685.14309295984318
346064.0043472495128-4.00434724951285
356664.45019254244631.54980745755370
366764.94215691465322.05784308534681
378163.51238287730617.4876171226940
386264.0043472495128-2.00434724951285
396361.30814446223441.69185553776563
407365.15354979130167.84645020869844
415567.7325263704375-12.7325263704375
425965.8799665797935-6.87996657979353
436464.0043472495128-0.00434724951285137
446364.5674187505888-1.56741875058885
457464.21574012616129.78425987383878
466762.57457321216564.42542678783438
476466.1144189960786-2.11441899607862
487365.41106174722347.58893825277664
495464.0043472495128-10.0043472495129
507666.34887141236379.6511285876363
517465.27077599944418.7292240005559
526368.3186574111502-5.31865741115021
537365.62245462387177.37754537612827
546762.92625183659334.07374816340675
556867.02916912158220.970830878417757
566663.41821620880012.58178379119986
576267.1463953297248-5.14639532972478
587164.91909737501656.08090262498353
596865.9971927879362.00280721206392
606360.3703347970942.62966520290597
617566.93500245307648.06499754692358
627765.176609330938311.8233906690617
636264.5674187505888-2.56741875058885
647464.70770449836819.29229550163189
656764.09851391801872.90148608198132
665665.5052284157292-9.50522841572919
676066.560264289012-6.56026428901207
685867.9669787867226-9.96697878672258
696563.65266862508521.34733137491478
704967.1463953297248-18.1463953297248
716162.8320851680874-1.83208516808743
726665.38800220758670.611997792413354
736464.0985139180187-0.0985139180186764
746564.21574012616120.78425987383878
754663.5354424169427-17.5354424169427
768161.871215963310419.1287840366896
776564.68464495873140.31535504126861
787265.87996657979356.12003342020647
796564.21574012616120.78425987383878
807467.26362153786736.73637846213267
816963.88712104137035.11287895862969
825963.0665375843725-4.06653758437251
835863.6296090854485-5.62960908544851
847165.7627403716515.23725962834901
857965.505228415729213.4947715842708
866865.0363235831592.96367641684098
876663.06653758437252.93346241562749
886264.2157401261612-2.21574012616122
896964.00434724951284.99565275048715
906063.183763792515-3.18376379251505
916365.2707759994441-2.27077599944410
926262.94931137623-0.949311376229968
936162.94931137623-1.94931137622997
946564.91909737501650.080902624983525
956463.88712104137030.112878958629691
966768.3186574111502-1.31865741115021
975663.3951566691634-7.39515666916342
985665.6224546238717-9.62245462387173
994861.5425968785195-13.5425968785195
1007464.2387996657989.76120033420206
1016963.65266862508525.34733137491478
1026265.0593831227957-3.05938312279573
1037366.11441899607866.88558100392138
1046466.7005500367913-2.70055003679133
1055761.3081444622344-4.30814446223437
1065764.5904782902256-7.59047829022556
1076065.1535497913016-5.15354979130156
1086167.0291691215822-6.02916912158224
1097265.7627403716516.23725962834901
1105763.7698948332278-6.76989483322777
1115163.3009900006576-12.3009900006576
1126365.997192787936-2.99719278793608
1135464.5904782902256-10.5904782902256
1147265.52828795536596.47171204463409
1156264.3560258739405-2.35602587394048
1166865.7627403716512.23725962834901
1176264.7077044983681-2.70770449836811
1186365.6224546238717-2.62245462387173
1197766.935002453076410.0649975469236
1205762.0115017110896-5.01150171108963
1215762.7148589599449-5.71485895994488
1226165.997192787936-4.99719278793608
1236663.27793046102092.72206953897912
1246561.30814446223443.69185553776563
1256365.762740371651-2.76274037165099
1265961.5425968785195-2.54259687851946
1276666.6774904971546-0.677490497154615
1286865.87996657979352.12003342020647
1297263.88712104137038.11287895862969
1306863.41821620880014.58178379119986
1316866.44303808086951.55696191913047
1326762.83208516808744.16791483191257
1335964.1215734576554-5.12157345765539
1345664.3560258739405-8.35602587394048
1356265.997192787936-3.99719278793608
1365564.5674187505888-9.56741875058885
1377267.14639532972484.85360467027522
1386866.67749049715461.32250950284539
1396765.41106174722341.58893825277664
1405461.8942755029471-7.89427550294709
1416966.09135945644192.9086405435581
1426164.5904782902256-3.59047829022556
1435562.2459541273747-7.24595412737471
1447566.20858566458448.79141433541556
1455563.7698948332278-8.76989483322776
1464964.3560258739405-15.3560258739405
1475463.2779304610209-9.27793046102088
1485163.6526686250852-12.6526686250852
1496664.12157345765541.87842654234461
1507365.41106174722347.58893825277664
1516367.1463953297248-4.14639532972478
1526163.3951566691634-2.39515666916342
1537465.64551416350858.35448583649155
1548162.926251836593318.0737481634068
1555863.6526686250852-5.65266862508522
1566262.94931137623-0.949311376229968
1576461.77704929480452.22295070519546
1586262.3631803355173-0.363180335517254
1598564.23879966579820.7612003342021
1607464.82493070651079.17506929348935
1615166.2316452042212-15.2316452042212
1626662.83208516808743.16791483191257
1636164.0985139180187-3.09851391801868
1647265.05938312279576.94061687720426


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.3102109092516860.6204218185033720.689789090748314
70.1729987902677570.3459975805355150.827001209732243
80.08736974454444990.1747394890889000.91263025545555
90.1669904807391830.3339809614783660.833009519260817
100.1361348656674340.2722697313348690.863865134332566
110.1066474012920220.2132948025840440.893352598707978
120.06247622622555690.1249524524511140.937523773774443
130.04024817586791240.08049635173582470.959751824132088
140.05332778660493330.1066555732098670.946672213395067
150.07732988525517570.1546597705103510.922670114744824
160.1407208199258700.2814416398517410.85927918007413
170.1238736295371690.2477472590743390.876126370462831
180.1099737152500050.2199474305000090.890026284749995
190.07832253086647740.1566450617329550.921677469133523
200.0554909371237470.1109818742474940.944509062876253
210.03745635712358780.07491271424717560.962543642876412
220.02454699955940460.04909399911880920.975453000440595
230.6162618005445420.7674763989109160.383738199455458
240.5506155601022250.898768879795550.449384439897775
250.4863068761373840.9726137522747680.513693123862616
260.4255487269789330.8510974539578670.574451273021066
270.3695813416118850.739162683223770.630418658388115
280.3567185869029940.7134371738059870.643281413097006
290.4131223663600360.8262447327200710.586877633639964
300.3638238353796560.7276476707593120.636176164620344
310.309875723644270.619751447288540.69012427635573
320.2591630759466710.5183261518933430.740836924053329
330.2479640783799810.4959281567599620.752035921620019
340.2240070822777350.4480141645554710.775992917722265
350.1885443161257190.3770886322514390.81145568387428
360.1531097850364110.3062195700728230.846890214963589
370.3968332468846580.7936664937693170.603166753115342
380.3522462077513270.7044924155026550.647753792248673
390.3036427436156080.6072854872312150.696357256384392
400.3071470919221650.614294183844330.692852908077835
410.4143642435417770.8287284870835530.585635756458223
420.411369552850040.822739105700080.58863044714996
430.3613975394972260.7227950789944510.638602460502774
440.3167057855808340.6334115711616690.683294214419166
450.348143232534420.696286465068840.65185676746558
460.3114509727297540.6229019454595080.688549027270246
470.2704904470334520.5409808940669040.729509552966548
480.275412969259330.550825938518660.72458703074067
490.3267425508512540.6534851017025090.673257449148746
500.3664267713070340.7328535426140670.633573228692966
510.3809811355144660.7619622710289330.619018864485534
520.3580408198368170.7160816396736330.641959180163183
530.3549464858191020.7098929716382030.645053514180898
540.3194050814591050.638810162918210.680594918540895
550.2777952231711860.5555904463423720.722204776828814
560.2416772528385080.4833545056770170.758322747161492
570.2245076278075650.4490152556151300.775492372192435
580.2102472475635930.4204944951271870.789752752436407
590.1798558436785830.3597116873571650.820144156321417
600.1533896927759860.3067793855519730.846610307224014
610.1625659413941260.3251318827882510.837434058605874
620.2119113370580580.4238226741161170.788088662941942
630.1863704855598290.3727409711196590.81362951444017
640.2021715681467850.404343136293570.797828431853215
650.1747287460157660.3494574920315320.825271253984234
660.2037298720084810.4074597440169610.79627012799152
670.1988781005383120.3977562010766240.801121899461688
680.2268783278097070.4537566556194140.773121672190293
690.1951641233805000.3903282467610010.8048358766195
700.4025809971043050.805161994208610.597419002895695
710.3686443823149570.7372887646299150.631355617685043
720.3268185787611280.6536371575222550.673181421238872
730.2869009708239550.573801941647910.713099029176045
740.2496191445606110.4992382891212220.750380855439389
750.4747380483789030.9494760967578060.525261951621097
760.7345751665714280.5308496668571440.265424833428572
770.6967352904357860.6065294191284280.303264709564214
780.683060818099670.633878363800660.31693918190033
790.643470592906780.7130588141864390.356529407093219
800.639738264785750.7205234704284990.360261735214250
810.6180668413942680.7638663172114650.381933158605732
820.5928936877277980.8142126245444040.407106312272202
830.5761385923901710.847722815219660.42386140760983
840.5525070039373930.8949859921252140.447492996062607
850.6670429573638960.6659140852722090.332957042636104
860.635032732888580.7299345342228410.364967267111420
870.602095086902280.795809826195440.39790491309772
880.5624672441442710.8750655117114570.437532755855729
890.5405360914550730.9189278170898540.459463908544927
900.5067890898277770.9864218203444450.493210910172223
910.4651104375979870.9302208751959730.534889562402013
920.4239679267363270.8479358534726540.576032073263673
930.3854247864384650.770849572876930.614575213561535
940.3437582373430000.6875164746860010.656241762657
950.3040709172422690.6081418344845380.695929082757731
960.2677888054351650.535577610870330.732211194564835
970.2645679894838250.5291359789676510.735432010516175
980.2924900976233020.5849801952466030.707509902376698
990.3867516218172040.7735032436344080.613248378182796
1000.4273103856645020.8546207713290030.572689614335498
1010.4120123191380020.8240246382760050.587987680861998
1020.3750361680748230.7500723361496450.624963831925177
1030.3701455611382510.7402911222765020.629854438861749
1040.3333960673521490.6667921347042970.666603932647851
1050.3039605026604810.6079210053209620.696039497339519
1060.3046928789333890.6093857578667780.695307121066611
1070.2837891111621860.5675782223243720.716210888837814
1080.2779025681405140.5558051362810270.722097431859486
1090.2671273339281240.5342546678562480.732872666071876
1100.2572876655733850.5145753311467710.742712334426615
1110.3219179920900620.6438359841801230.678082007909938
1120.2870769974676090.5741539949352180.712923002532391
1130.3310267144646240.6620534289292470.668973285535376
1140.3200596020807440.6401192041614880.679940397919256
1150.2808686800484770.5617373600969530.719131319951523
1160.2439984407276260.4879968814552520.756001559272374
1170.2109632203279350.4219264406558710.789036779672065
1180.1827763184120320.3655526368240640.817223681587968
1190.2110249440001940.4220498880003880.788975055999806
1200.1883469529718840.3766939059437680.811653047028116
1210.1716116757600980.3432233515201970.828388324239901
1220.1526828380571480.3053656761142970.847317161942852
1230.1269714754215880.2539429508431750.873028524578412
1240.1105352137098420.2210704274196840.889464786290158
1250.0906222785659210.1812445571318420.909377721434079
1260.07202667889608410.1440533577921680.927973321103916
1270.05622746348675150.1124549269735030.943772536513248
1280.04350950817820840.08701901635641690.956490491821792
1290.04702130540835410.09404261081670810.952978694591646
1300.04086632494278940.08173264988557880.95913367505721
1310.03034186488285580.06068372976571150.969658135117144
1320.02598225948106940.05196451896213890.97401774051893
1330.02062951271396180.04125902542792360.979370487286038
1340.02042637293009180.04085274586018360.979573627069908
1350.01593093051028270.03186186102056540.984069069489717
1360.02028226405601610.04056452811203220.979717735943984
1370.01493771931197450.02987543862394910.985062280688025
1380.01026730333991970.02053460667983940.98973269666008
1390.006932872687050370.01386574537410070.99306712731295
1400.006132565122657780.01226513024531560.993867434877342
1410.004006839225231680.008013678450463350.995993160774768
1420.002697726895460890.005395453790921780.99730227310454
1430.002340790778612690.004681581557225390.997659209221387
1440.002458066319645840.004916132639291680.997541933680354
1450.002716702940195170.005433405880390340.997283297059805
1460.01060945115702750.02121890231405500.989390548842973
1470.01403341968856200.02806683937712410.985966580311438
1480.03954817340653440.07909634681306870.960451826593466
1490.02597405215124770.05194810430249540.974025947848752
1500.02132789192384240.04265578384768490.978672108076158
1510.01430654622573980.02861309245147970.98569345377426
1520.01272595783673870.02545191567347740.987274042163261
1530.01158372871160700.02316745742321410.988416271288393
1540.03195282682476260.06390565364952510.968047173175237
1550.02975775906966470.05951551813932940.970242240930335
1560.01927124360358820.03854248720717640.980728756396412
1570.01168637931080500.02337275862161000.988313620689195
1580.01856810848160010.03713621696320010.9814318915184


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0326797385620915NOK
5% type I error level230.150326797385621NOK
10% type I error level340.222222222222222NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/10y3oc1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/10y3oc1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/192r01292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/192r01292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/2ktql1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/2ktql1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/3ktql1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/3ktql1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/4ktql1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/4ktql1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/5vkqo1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/5vkqo1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/6vkqo1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/6vkqo1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/76upr1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/76upr1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/86upr1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/86upr1292347764.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/9y3oc1292347764.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234768429ubdgrhbbcjj49/9y3oc1292347764.ps (open in new window)


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