Home » date » 2010 » Dec » 18 »

Paper MR 2

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sat, 18 Dec 2010 15:33:38 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl.htm/, Retrieved Sat, 18 Dec 2010 16:32:50 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl.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 «
69 26 9 15 25 25 53 20 9 15 25 24 43 21 9 14 19 21 60 31 14 10 18 23 49 21 8 10 18 17 62 18 8 12 22 19 45 26 11 18 29 18 50 22 10 12 26 27 75 22 9 14 25 23 82 29 15 18 23 23 60 15 14 9 23 29 59 16 11 11 23 21 21 24 14 11 24 26 62 17 6 17 30 25 54 19 20 8 19 25 47 22 9 16 24 23 59 31 10 21 32 26 37 28 8 24 30 20 43 38 11 21 29 29 48 26 14 14 17 24 79 25 11 7 25 23 62 25 16 18 26 24 16 29 14 18 26 30 38 28 11 13 25 22 58 15 11 11 23 22 60 18 12 13 21 13 67 21 9 13 19 24 55 25 7 18 35 17 47 23 13 14 19 24 59 23 10 12 20 21 49 19 9 9 21 23 47 18 9 12 21 24 57 18 13 8 24 24 39 26 16 5 23 24 49 18 12 10 19 23 26 18 6 11 17 26 53 28 14 11 24 24 75 17 14 12 15 21 65 29 10 12 25 23 49 12 4 15 27 28 48 25 12 12 29 23 45 28 12 16 27 22 31 20 14 14 18 24 61 17 9 17 25 21 49 17 9 13 22 23 69 20 10 10 26 23 54 31 14 17 23 20 80 21 10 12 16 23 57 19 9 13 27 21 34 23 14 13 25 27 69 15 8 11 14 12 44 24 9 13 19 15 70 28 8 12 20 22 51 16 9 12 16 21 66 19 9 12 18 21 18 21 9 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 time12 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Anxiety[t] = + 56.071093699893 -0.342980598360856Concern[t] + 0.0774281170230556Doubts[t] + 0.306566415060552Pexpectations[t] + 0.00433514557748334Standards[t] -0.0653485310147079Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)56.0710936998939.1809626.107300
Concern-0.3429805983608560.247037-1.38840.1671380.083569
Doubts0.07742811702305560.4489840.17250.8633210.431661
Pexpectations0.3065664150605520.3557730.86170.3902710.195135
Standards0.004335145577483340.3147030.01380.9890280.494514
Organization-0.06534853101470790.317583-0.20580.8372580.418629


Multiple Linear Regression - Regression Statistics
Multiple R0.138481637077551
R-squared0.0191771638076785
Adjusted R-squared-0.0144126593495926
F-TEST (value)0.570921844925736
F-TEST (DF numerator)5
F-TEST (DF denominator)146
p-value0.722183276880675
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation13.5237287475725
Sum Squared Residuals26702.1209287361


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16950.92361278569618.076387214304
25353.0468449068757-0.0468449068757286
34352.5673326130335-9.56733261303352
46048.163369346691111.8366306533089
54951.5206978142496-2.52069781424960
66253.04941595973388.95058404026621
74552.4729485643365-7.47294856433652
85051.3269021345288-1.32690213452875
97552.119665826108222.8803341738918
108251.400965708807730.5990342911923
116052.97407704720357.02592295279655
125953.53473317601225.4652668239878
132150.7007652306985-29.7007652306985
146254.41296237788297.58703762211707
155452.00421048258671.99578951741330
164752.7284635106518-5.72846351065177
175951.09053388930567.90946611069438
183753.267739590457-16.267739590457
194348.5580467880261-5.55804678802611
204851.0348543221454-3.03485432214543
217949.099615359647829.9003846403522
226252.7979731249929.20202687500804
231650.8791033114142-34.8791033114142
243849.9754205859433-11.9754205859433
255853.81236524335834.18763475664166
266054.05345088339735.94654911660266
276752.064720604928914.9352793950712
285552.59757609908482.40242390091524
294751.9950382913599-4.99503829135991
305951.35000184879127.64999815120876
314951.598434963578-2.59843496357802
324752.7957662761058-5.79576627610583
335751.89221852068835.10778147931171
343948.4566236941115-9.45662369411146
354952.4715960369136-3.47159603691364
362652.1088778656368-26.1088778656368
375349.45953989928443.54046010071556
387553.695922179161221.3040778208388
396549.183096924484115.8169030755159
404955.1508252757434-6.15082527574342
414850.7272161342836-2.72721613428358
424550.981218239303-5.98121823930296
433153.0970730578881-22.0970730578881
446154.88496512512356.11503487487649
454953.5149969661194-4.51499696611943
466951.661124625188217.3388753748118
475450.52705557304653.47294442695347
488051.887925401173628.1120745988264
495752.98140855931464.01859144068545
503451.5958652737432-17.5958652737432
516954.194549892238914.8054501077611
524451.6239155889786-7.62391558897865
537049.414894091926120.5851059080739
545153.6560973379842-2.65609733798425
556652.635825834056613.3641741659434
561851.1128545054779-33.1128545054779
577450.698561107858823.3014388921412
585953.56954418324135.43045581675869
594853.2367480803545-5.23674808035455
605550.29981204089444.70018795910561
614448.8095960370112-4.80959603701121
625647.90939695268748.09060304731255
636552.121575633087112.8784243669129
647751.753864834774525.2461351652255
654647.6879586676204-1.68795866762042
667053.086403780184416.9135962198156
673955.505152477155-16.505152477155
685555.4312660158234-0.431266015823426
694451.8381977872098-7.83819778720984
704552.9089025784407-7.90890257844075
714552.1638244498393-7.16382444983932
724951.8326588326418-2.83265883264185
736551.368136245636113.6318637543639
744547.0472573706292-2.04725737062923
757151.044096679609819.9559033203902
764853.6807423306048-5.68074233060483
774151.9501736696403-10.9501736696403
784052.2827065307054-12.2827065307054
796451.7225483297312.2774516702701
805651.84040327307274.15959672692729
815253.3556301612206-1.35563016122058
824149.4267996156825-8.42679961568248
834253.4511195749867-11.4511195749867
845454.7296377869182-0.729637786918216
854054.5240713456767-14.5240713456767
864051.9100869496649-11.9100869496649
875152.9813788482988-1.98137884829885
884853.2142221200736-5.21422212007365
898054.447701648033525.5522983519665
903853.5348209925587-15.5348209925586
915754.33266889214112.66733110785889
922847.9573591109086-19.9573591109086
935153.8572271390314-2.85722713903145
944651.1472282086333-5.14722820863332
955852.96653806771255.03346193228755
966753.275983204913213.7240167950868
977252.035346227094219.9646537729058
982651.9021226564984-25.9021226564984
995454.2199873363711-0.219987336371117
1005351.92150392677091.07849607322914
1016447.166185241978916.8338147580211
1024755.7186996859885-8.71869968598851
1034352.6867005145034-9.68670051450343
1046650.226763821558115.7732361784419
1055450.21393381010093.78606618989907
1066255.1660225667916.83397743320901
1075253.7687344662939-1.76873446629385
1086452.710153688531711.2898463114683
1095549.28442097170215.71557902829785
1105752.78828780354324.21171219645681
1117453.358202577101920.6417974228981
1123252.2166075742418-20.2166075742418
1133851.046272454457-13.046272454457
1146654.99159219470611.0084078052941
1153752.0646327883824-15.0646327883824
1162653.0613187574436-27.0613187574436
1176453.748736377602610.2512636223974
1182850.0478967389701-22.0478967389701
1196655.367151004814910.6328489951851
1206553.138482269621711.8615177303783
1214851.8007552201943-3.80075522019429
1224454.8279925694031-10.8279925694031
1236452.764892410396811.2351075896032
1243950.0370223249755-11.0370223249755
1255053.6217249978521-3.62172499785211
1266652.708918805502213.2910811944978
1274849.4950121523927-1.49501215239269
1287052.427702018027417.5722979819726
1296653.862841919747712.1371580802523
1306152.76820053528238.23179946471774
1313150.5219700020202-19.5219700020202
1326151.70607706345439.29392293654574
1335450.5017923989843.49820760101603
1343450.8303596537053-16.8303596537053
1356250.801554940782511.1984450592175
1364753.1436112297341-6.1436112297341
1375249.99736091867572.00263908132434
1383752.812488793805-15.8124887938050
1394647.520319575624-1.52031957562402
1403852.2903631545898-14.2903631545898
1416353.81236524335839.18763475664166
1423452.616576807791-18.6165768077910
1434650.071659062135-4.07165906213499
1444052.3260282754645-12.3260282754645
1453054.5240713456767-24.5240713456767
1463547.7973766427966-12.7973766427966
1475151.8007552201943-0.800755220194286
1485653.7108657708652.28913422913496
1496852.536943204905115.4630567950949
1503954.152874712637-15.152874712637
1514452.4715960369136-8.47159603691363
1525854.1528747126373.84712528736299


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.6788305331989090.6423389336021810.321169466801091
100.8228854404123270.3542291191753450.177114559587672
110.7220371058836270.5559257882327470.277962894116373
120.6301742537430920.7396514925138160.369825746256908
130.932136848999650.1357263020006990.0678631510003493
140.8937679047654590.2124641904690830.106232095234541
150.8450014125886490.3099971748227020.154998587411351
160.8472663100375050.305467379924990.152733689962495
170.7934434784395520.4131130431208960.206556521560448
180.8622127454363760.2755745091272480.137787254563624
190.844433370751880.3111332584962420.155566629248121
200.8118904447783110.3762191104433770.188109555221689
210.8665343806217510.2669312387564980.133465619378249
220.8437746171659630.3124507656680740.156225382834037
230.9526786643525830.09464267129483480.0473213356474174
240.9607773117479410.07844537650411730.0392226882520587
250.9447486251414980.1105027497170050.0552513748585023
260.9253758138624020.1492483722751970.0746241861375983
270.9256547034618420.1486905930763170.0743452965381583
280.9017948231568550.1964103536862900.0982051768431449
290.8752327523312160.2495344953375670.124767247668784
300.8438456577226690.3123086845546620.156154342277331
310.8194628106869360.3610743786261270.180537189313064
320.7886991998243480.4226016003513040.211300800175652
330.7452938514683750.509412297063250.254706148531625
340.751310519995090.4973789600098210.248689480004910
350.710161623606380.5796767527872410.289838376393620
360.806301843234010.3873963135319790.193698156765989
370.7655265124120310.4689469751759380.234473487587969
380.8093821097852590.3812357804294830.190617890214741
390.8119147406628970.3761705186742060.188085259337103
400.7765824353128890.4468351293742220.223417564687111
410.7408701377186410.5182597245627170.259129862281359
420.7088773436864950.5822453126270100.291122656313505
430.7686135846345180.4627728307309640.231386415365482
440.7338291632151860.5323416735696280.266170836784814
450.6931217136429390.6137565727141230.306878286357061
460.7041190819474450.5917618361051110.295880918052555
470.6582302279341370.6835395441317260.341769772065863
480.7902324599379750.4195350801240510.209767540062025
490.7533089292576360.4933821414847280.246691070742364
500.7681546697784680.4636906604430630.231845330221532
510.7570998250641720.4858003498716560.242900174935828
520.7593924852039620.4812150295920750.240607514796038
530.7903189562715920.4193620874568160.209681043728408
540.7562594643525280.4874810712949450.243740535647472
550.7475342723239680.5049314553520650.252465727676033
560.9179444031010050.1641111937979900.0820555968989948
570.9456870658151460.1086258683697080.0543129341848538
580.9336296399129380.1327407201741250.0663703600870624
590.9187256201397180.1625487597205650.0812743798602823
600.9008772098024450.1982455803951100.0991227901975548
610.8923960427114520.2152079145770960.107603957288548
620.8776246819768280.2447506360463450.122375318023173
630.87264118175650.2547176364869980.127358818243499
640.923594252448060.1528114951038810.0764057475519407
650.905752065938430.1884958681231420.094247934061571
660.914354127389020.1712917452219610.0856458726109807
670.9243538198386760.1512923603226470.0756461801613236
680.9058317307918530.1883365384162950.0941682692081474
690.8947619838638540.2104760322722930.105238016136146
700.8799561628828030.2400876742343940.120043837117197
710.8619734909475040.2760530181049910.138026509052496
720.8351536224692380.3296927550615250.164846377530762
730.8339994032900750.3320011934198490.166000596709924
740.8082473892323960.3835052215352080.191752610767604
750.8522085286841430.2955829426317150.147791471315857
760.828896120135590.3422077597288190.171103879864409
770.8183628482828290.3632743034343420.181637151717171
780.813368907927660.373262184144680.18663109207234
790.8306733238820340.3386533522359320.169326676117966
800.8018946953355370.3962106093289250.198105304664463
810.7688931989802220.4622136020395560.231106801019778
820.7451356289971520.5097287420056950.254864371002848
830.7372990149061220.5254019701877560.262700985093878
840.6974046992738230.6051906014523550.302595300726177
850.7026383339007900.5947233321984190.297361666099210
860.6950736298284990.6098527403430020.304926370171501
870.6598495924636010.6803008150727980.340150407536399
880.6246295683146050.7507408633707910.375370431685395
890.7228828208220730.5542343583558550.277117179177927
900.7496069308079260.5007861383841480.250393069192074
910.7100162478649140.5799675042701710.289983752135086
920.7431819344022790.5136361311954420.256818065597721
930.7035522898904150.592895420219170.296447710109585
940.6699694426040190.6600611147919620.330030557395981
950.6265294555030490.7469410889939030.373470544496952
960.6203440917162490.7593118165675020.379655908283751
970.6628446472870150.674310705425970.337155352712985
980.782217011001830.4355659779963390.217782988998170
990.7435696583034180.5128606833931630.256430341696582
1000.7010043508635310.5979912982729380.298995649136469
1010.7657023601888930.4685952796222140.234297639811107
1020.7536014989162450.4927970021675090.246398501083755
1030.7334914405584420.5330171188831170.266508559441558
1040.7577522909414650.4844954181170690.242247709058535
1050.7383810397240450.523237920551910.261618960275955
1060.6997227334827060.6005545330345870.300277266517294
1070.6525821503361610.6948356993276780.347417849663839
1080.6385857586840820.7228284826318370.361414241315918
1090.615296343052720.769407313894560.38470365694728
1100.5649286025282960.8701427949434070.435071397471704
1110.6397162925515820.7205674148968360.360283707448418
1120.6872637371742160.6254725256515690.312736262825784
1130.6581230510725010.6837538978549980.341876948927499
1140.6270161502624270.7459676994751470.372983849737573
1150.6157542333881230.7684915332237530.384245766611877
1160.787359597743390.4252808045132180.212640402256609
1170.7661922048795470.4676155902409060.233807795120453
1180.8514039547641250.2971920904717510.148596045235875
1190.8281394274572290.3437211450855430.171860572542771
1200.8213530168372110.3572939663255780.178646983162789
1210.7777353763727930.4445292472544150.222264623627207
1220.746532377928640.506935244142720.25346762207136
1230.7339594941567030.5320810116865940.266040505843297
1240.7185345429874070.5629309140251860.281465457012593
1250.6617990749469220.6764018501061560.338200925053078
1260.664566205351490.670867589297020.33543379464851
1270.5977120752304860.8045758495390280.402287924769514
1280.6621474471819240.6757051056361510.337852552818076
1290.6558111757619920.6883776484760170.344188824238008
1300.7196119139867160.5607761720265680.280388086013284
1310.7619479462509510.4761041074980990.238052053749049
1320.7767635090684250.4464729818631510.223236490931575
1330.714618316688230.570763366623540.28538168331177
1340.8025211732912190.3949576534175620.197478826708781
1350.7388278260796260.5223443478407480.261172173920374
1360.6889263920823670.6221472158352660.311073607917633
1370.6584113316732270.6831773366535450.341588668326773
1380.565962966749260.8680740665014790.434037033250740
1390.4673066024098450.934613204819690.532693397590155
1400.3597189712557510.7194379425115030.640281028744249
1410.4911522287409970.9823044574819930.508847771259003
1420.5960793948091570.8078412103816870.403920605190843
1430.4348552696594060.8697105393188110.565144730340594


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/36bga1292686405.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/36bga1292686405.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/46bga1292686405.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/46bga1292686405.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/56bga1292686405.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/56bga1292686405.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/89bwf1292686405.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/89bwf1292686405.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/99bwf1292686405.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292686359oy2ej64seyxrisl/99bwf1292686405.ps (open in new window)


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