Home » date » 2010 » Dec » 12 »

WS10 MR

*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, 12 Dec 2010 20:19:00 +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/12/t1292185042tktfra56jvd9xs2.htm/, Retrieved Sun, 12 Dec 2010 21:17:25 +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/12/t1292185042tktfra56jvd9xs2.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 «
5 2 1 3 73 62 66 12 1 1 1 58 54 54 11 1 1 3 68 41 82 6 1 1 3 62 49 61 12 1 2 3 65 49 65 11 1 1 3 81 72 77 12 1 1 1 73 78 66 7 2 4 3 64 58 66 8 1 1 3 68 58 66 13 1 1 1 51 23 48 12 1 1 1 68 39 57 13 1 1 3 61 63 80 12 1 1 1 69 46 60 12 1 3 3 73 58 70 11 2 1 3 61 39 85 12 2 1 1 62 44 59 12 1 1 1 63 49 72 12 1 6 1 69 57 70 11 2 1 3 47 76 74 13 2 1 1 66 63 70 9 1 1 3 58 18 51 11 2 1 3 63 40 70 11 1 1 1 69 59 71 11 2 1 3 59 62 72 9 1 1 1 59 70 50 11 2 1 4 63 65 69 12 2 1 3 65 56 73 12 1 1 3 65 45 66 10 2 1 3 71 57 73 12 1 4 3 60 50 58 12 2 1 1 81 40 78 12 1 1 3 67 58 83 9 2 1 3 66 49 76 9 1 1 3 62 49 77 12 1 1 3 63 27 79 14 2 1 1 73 51 71 12 2 1 3 55 75 79 11 1 1 1 59 65 60 9 1 1 2 64 47 73 11 2 1 3 63 49 70 7 1 1 1 64 65 42 15 1 1 1 73 61 74 11 1 1 3 54 46 68 12 1 1 3 76 69 83 12 2 2 1 74 55 62 9 2 1 3 63 78 79 12 2 1 3 73 58 61 11 2 1 3 67 34 86 11 2 2 3 68 67 64 8 1 4 3 66 45 75 7 2 1 1 62 68 59 12 2 4 3 71 49 82 8 1 1 2 63 19 61 10 1 1 1 75 72 69 12 1 2 2 77 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
FF[t] = + 9.18224164145946 + 0.298990332610133Geslacht[t] + 0.163161952286726Opvoeding[t] -0.257077272602828Huwelijksstatus[t] -0.0100266770906813TotNV[t] -0.0148141827227416TotAngst[t] + 0.0473935603538839TotGroep[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.182241641459461.5578615.894100
Geslacht0.2989903326101330.3071360.97350.3320070.166004
Opvoeding0.1631619522867260.173090.94260.34750.17375
Huwelijksstatus-0.2570772726028280.161041-1.59640.1126810.056341
TotNV-0.01002667709068130.021414-0.46820.6403460.320173
TotAngst-0.01481418272274160.011896-1.24530.2151310.107566
TotGroep0.04739356035388390.0167192.83460.0052720.002636


Multiple Linear Regression - Regression Statistics
Multiple R0.274950342612271
R-squared0.075597690902605
Adjusted R-squared0.0356954329559548
F-TEST (value)1.89457175590615
F-TEST (DF numerator)6
F-TEST (DF denominator)139
p-value0.0858767171679528
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.76419276719941
Sum Squared Residuals432.620280657581


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1510.6497006680846-5.64970066808459
21210.56505577457571.43494422542434
31111.4702385237676-0.470238523767581
4610.4166203570982-4.41662035709817
51210.73927651952841.26072348047161
61110.64368425541430.356315744585684
71210.62783795711621.37216204288375
8711.2886833496519-4.28868334965187
9810.4601004518188-2.46010045181883
101310.81012081649212.18987918350789
111210.82918242557161.17081757442838
121311.11972612279431.88027387720573
131210.85763715048341.1423628495166
141210.92586521235441.07413478764559
151112.0112246425196-1.01122464251962
161211.20904902781990.790950972180097
171211.44207738910590.557922610894129
181211.98442650550570.0155734944942877
191111.082144197155-0.0821441971549943
201311.40880201161781.59119798838219
21910.442031126327-1.44203112632705
221111.2654537003073-0.265453700307255
231111.1863819389805-0.186381938980484
241111.0744355094774-0.0744355094774334
25910.1284279325056-1.12842793250558
261110.5906282992820.409371700717996
271211.15055410362370.84944589637632
281210.68276485848651.31723514151348
291011.0755798583568-1.07557985835685
301210.76916470435531.23083529564468
311211.97827654071170.0217234592882804
321211.27581765492550.724182345074461
33911.3864073866538-2.38640738665384
34911.1749173227603-2.17491732276032
351211.58558978627770.414410213722283
361411.56377902500982.43622097499018
371211.25371276492170.746287235078295
381110.67643444965810.323565550341876
39911.2519953652117-2.25199536521173
401111.1321260558026-0.132126055802581
4179.7732169778348-2.77321697783481
421511.25882754623393.74117245376607
431110.8730312444690.126968755530964
441211.02262155115930.97737844884075
451211.23111552612990.768884473870052
46911.129056800028-2.12905680002803
471210.47198959720611.52801040279386
481112.0725290539431-1.07252905394312
491110.69413797150320.305862028496751
50811.588766081441-3.58876608144097
51710.8535086424741-3.85350864247411
521212.1101212201839-0.110121220183915
53811.1080964342926-3.10809643429257
541010.838850380333-0.838850380332988
551210.49092403804621.50907596195379
561510.99159002174224.00840997825778
571211.14047216002850.859527839971514
581211.59162477405380.408375225946216
591210.66912046100751.33087953899246
601210.93576973973211.06423026026791
6189.6418800470631-1.64188004706309
621011.0944927189487-1.09449271894873
631411.62491154284892.37508845715108
641011.3479000098012-1.34790000980115
651210.74361374879351.25638625120647
661410.4082449612183.59175503878202
67611.7654569157029-5.76545691570287
681110.39933611967060.600663880329379
691010.9995203860051-0.99952038600505
701411.82851541740882.17148458259116
711211.19183229752520.808167702474758
721311.52848911393341.47151088606655
731110.8203360740580.179663925941977
741110.91473396753770.0852660324622618
751211.33452376620790.6654762337921
761311.82531814324731.17468185675268
771210.69829500563161.3017049943684
7889.9023635413064-1.90236354130641
791211.2567527290420.743247270958031
801111.1911163331029-0.191116333102898
811010.9644416620148-0.96444166201481
821210.52119367615621.4788063238438
831110.13070026098770.869299739012338
841211.56766651579280.432333484207174
851210.89172960117071.10827039882928
861010.6013341139498-0.60133411394983
871211.58140601176390.418593988236091
881211.53285424539320.467145754606766
891111.4155542561326-0.415554256132604
901010.4119212649148-0.411921264914847
911211.34954913601680.650450863983222
921110.97018946609960.0298105339004298
931210.4706520124221.52934798757803
941210.07459527364751.92540472635252
951010.2382404230222-0.238240423022224
961111.2920061249348-0.292006124934809
971011.1059305101711-1.10593051017114
981111.2652395080787-0.265239508078719
991111.0234811955348-0.023481195534839
1001211.07693570598410.923064294015935
1011110.89034477355090.109655226449124
1021111.2232680918122-0.223268091812199
10379.33954315309279-2.33954315309279
1041210.09100793773271.90899206226727
105810.8097328025085-2.80973280250851
1061010.8283482175604-0.828348217560387
1071211.07259986617860.927400133821434
1081110.78685668157780.213143318422178
1091311.45731309585341.54268690414665
110910.8733652051926-1.87336520519258
1111110.68179186470560.318208135294363
1121310.22857246826092.77142753173914
113810.4117737296717-2.41177372967167
1141211.47074931138860.529250688611413
1151110.2465886822430.753411317757005
1161111.1895994047568-0.189599404756792
1171210.52821021926681.47178978073322
1181310.83768275008412.16231724991592
1191111.2586754809422-0.258675480942236
1201010.8364394474226-0.836439447422622
1211011.1884198955491-1.18841989554912
1221011.0403170839399-1.04031708393989
1231210.85520361096211.14479638903787
1241210.97233224512421.02766775487578
1251310.59749362724842.40250637275158
1261111.2364171361871-0.236417136187077
1271110.68263275776030.317367242239749
1281211.06669560220010.933304397799921
129911.0407747600513-2.04077476005125
1301111.4205236571965-0.420523657196514
1311211.11773756405620.882262435943825
1321211.00903959227880.990960407721214
1331311.18093373543061.81906626456941
134610.34688528329-4.34688528328997
1351111.3282099079976-0.32820990799762
1361011.5994346551206-1.59943465512056
1371212.2015349545338-0.20153495453375
1381110.68725276358370.312747236416293
1391211.29036307154290.709636928457118
1401211.22109741059290.778902589407103
141711.5838094094834-4.58380940948336
1421210.9409596549711.059040345029
1431211.7605848519120.239415148087993
144911.0533246033564-2.05332460335639
1451210.59201343856351.40798656143649
1461210.88898977607121.11101022392881


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.5097637846740130.9804724306519750.490236215325988
110.7380818571967820.5238362856064360.261918142803218
120.7590336550013240.4819326899973530.240966344998676
130.6639768744463440.6720462511073130.336023125553656
140.5721671438217810.8556657123564370.427832856178219
150.515475940355650.96904811928870.48452405964435
160.5784399571975780.8431200856048450.421560042802422
170.7618299525536210.4763400948927570.238170047446379
180.8073832911267140.3852334177465720.192616708873286
190.767519308420090.464961383159820.23248069157991
200.7431325552163580.5137348895672840.256867444783642
210.6880890587919970.6238218824160060.311910941208003
220.6956926876494950.608614624701010.304307312350505
230.7142396998787590.5715206002424830.285760300121241
240.680733108042260.638533783915480.31926689195774
250.6647035858885670.6705928282228650.335296414111433
260.7627394446039770.4745211107920450.237260555396023
270.7593147119109850.481370576178030.240685288089015
280.7535185483120150.4929629033759690.246481451687985
290.7053647088637550.589270582272490.294635291136245
300.7294825055074250.541034988985150.270517494492575
310.6743620182742690.6512759634514620.325637981725731
320.6174446637881370.7651106724237260.382555336211863
330.6221736372161030.7556527255677940.377826362783897
340.6832020171322980.6335959657354040.316797982867702
350.6280547052400880.7438905895198240.371945294759912
360.6700494453679780.6599011092640440.329950554632022
370.6260049666409250.747990066718150.373995033359075
380.5820752879034690.8358494241930620.417924712096531
390.658965940409370.6820681191812590.341034059590629
400.6135997615561460.7728004768877090.386400238443854
410.6612824285495290.6774351429009420.338717571450471
420.7625433021807350.4749133956385310.237456697819265
430.7180559680535830.5638880638928340.281944031946417
440.6849341380069170.6301317239861660.315065861993083
450.6507261609618480.6985476780763050.349273839038152
460.6613921807108770.6772156385782450.338607819289123
470.7294829505262680.5410340989474650.270517049473733
480.7035218952725350.592956209454930.296478104727465
490.6801265263922130.6397469472155750.319873473607787
500.787961650890110.4240766982197810.212038349109891
510.9067107728266860.1865784543466280.093289227173314
520.8886143050101570.2227713899796850.111385694989843
530.9271437849513650.1457124300972710.0728562150486355
540.9187162632694710.1625674734610580.0812837367305291
550.9168751883004690.1662496233990630.0831248116995314
560.9796428438039240.04071431239215150.0203571561960757
570.9744309397184720.05113812056305550.0255690602815278
580.9662941369067280.06741172618654320.0337058630932716
590.9647096111159860.07058077776802760.0352903888840138
600.9575345358030350.08493092839392920.0424654641969646
610.9552883534406980.08942329311860380.0447116465593019
620.947015198706260.1059696025874790.0529848012937395
630.9552525883294530.08949482334109430.0447474116705471
640.9500486416818650.09990271663626970.0499513583181349
650.9454295166539710.1091409666920570.0545704833460286
660.9779539076691260.04409218466174780.0220460923308739
670.999410129318950.001179741362099370.000589870681049683
680.9991411639225530.001717672154893230.000858836077446615
690.9989174018989320.002165196202136570.00108259810106829
700.9990811317351560.001837736529688340.000918868264844172
710.998743093362390.00251381327522150.00125690663761075
720.998569614134160.002860771731679610.0014303858658398
730.9978702438018950.004259512396210160.00212975619810508
740.9968798399344040.006240320131192360.00312016006559618
750.9957796164367470.008440767126505410.00422038356325271
760.9947507857280690.0104984285438620.00524921427193098
770.9940956928399980.01180861432000360.0059043071600018
780.9951305132363370.009738973527325960.00486948676366298
790.9933342135960150.01333157280797040.0066657864039852
800.9906326282431450.01873474351370930.00936737175685467
810.9891221763976870.02175564720462580.0108778236023129
820.9877353871992870.02452922560142690.0122646128007134
830.985288529039180.02942294192163850.0147114709608192
840.9810362096261990.03792758074760290.0189637903738015
850.9765760182267780.04684796354644470.0234239817732223
860.9706863952470580.05862720950588390.029313604752942
870.962290778942010.0754184421159790.0377092210579895
880.9511306093295670.0977387813408670.0488693906704335
890.9387332750985350.1225334498029310.0612667249014653
900.9262968036197570.1474063927604870.0737031963802434
910.9158929158658650.1682141682682710.0841070841341353
920.8952419251551230.2095161496897540.104758074844877
930.889580887784420.2208382244311610.11041911221558
940.8969612412167310.2060775175665370.103038758783269
950.8727894023180180.2544211953639640.127210597681982
960.8430869005154210.3138261989691580.156913099484579
970.8189308566210510.3621382867578970.181069143378948
980.7873800904368980.4252398191262030.212619909563102
990.7457201043822550.5085597912354910.254279895617745
1000.7312333398559630.5375333202880740.268766660144037
1010.6842801287281050.631439742543790.315719871271895
1020.6345884621287540.7308230757424910.365411537871246
1030.7054995425124150.5890009149751710.294500457487585
1040.684336022740220.6313279545195590.31566397725978
1050.7314602419732860.5370795160534280.268539758026714
1060.6967907000494920.6064185999010150.303209299950508
1070.6799106362306260.6401787275387490.320089363769374
1080.6259893450337520.7480213099324970.374010654966248
1090.6037482969691690.7925034060616620.396251703030831
1100.5936971651095180.8126056697809630.406302834890482
1110.534371042929180.931257914141640.46562895707082
1120.6044371976687660.7911256046624680.395562802331234
1130.6925446449100650.614910710179870.307455355089935
1140.6462947958968510.7074104082062980.353705204103149
1150.5873284266121750.825343146775650.412671573387825
1160.522760262509640.954479474980720.47723973749036
1170.478535476565820.957070953131640.52146452343418
1180.5046994357728590.9906011284542820.495300564227141
1190.4479670737510680.8959341475021360.552032926248932
1200.383844317141240.7676886342824810.61615568285876
1210.3648796524424380.7297593048848770.635120347557562
1220.314068502502950.6281370050059010.68593149749705
1230.2596336346047440.5192672692094870.740366365395256
1240.2091076830161870.4182153660323740.790892316983813
1250.2357230771205640.4714461542411270.764276922879436
1260.178995689691050.35799137938210.82100431030895
1270.1354547451915640.2709094903831280.864545254808436
1280.1002834096893150.200566819378630.899716590310685
1290.09769764240667330.1953952848133470.902302357593327
1300.06438892699388090.1287778539877620.935611073006119
1310.0425406183378110.0850812366756220.95745938166219
1320.02722053123414730.05444106246829460.972779468765853
1330.03741510674772740.07483021349545490.962584893252273
1340.2226354369543880.4452708739087760.777364563045612
1350.1378534817502010.2757069635004020.862146518249799
1360.08344325621964760.1668865124392950.916556743780352


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level100.078740157480315NOK
5% type I error level210.165354330708661NOK
10% type I error level340.267716535433071NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/10vsub1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/10vsub1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/17ry01292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/17ry01292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/2z0fk1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/2z0fk1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/3z0fk1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/3z0fk1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/4z0fk1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/4z0fk1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/5sawn1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/5sawn1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/6sawn1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/6sawn1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/731vq1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/731vq1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/831vq1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/831vq1292185129.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/9vsub1292185129.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292185042tktfra56jvd9xs2/9vsub1292185129.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