Home » date » 2010 » Dec » 14 »

WS 10 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: Tue, 14 Dec 2010 11:32:14 +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/t1292326261r4lz47sx4z3uxdz.htm/, Retrieved Tue, 14 Dec 2010 12:31:01 +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/t1292326261r4lz47sx4z3uxdz.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 «
24 1 24 13 13 13 25 1 25 12 12 13 17 1 30 15 10 16 18 0 19 12 9 12 18 1 22 10 10 11 16 1 22 12 12 12 20 1 25 15 13 18 16 1 23 9 12 11 18 1 17 12 12 14 17 1 21 11 6 9 23 0 19 11 5 14 30 1 19 11 12 12 23 0 15 15 11 11 18 1 16 7 14 12 15 1 23 11 14 13 12 0 27 11 12 11 21 0 22 10 12 12 15 1 14 14 11 16 20 0 22 10 11 9 31 1 23 6 7 11 27 0 23 11 9 13 34 1 21 15 11 15 21 1 19 11 11 10 31 1 18 12 12 11 19 0 20 14 12 13 16 1 23 15 11 16 20 0 25 9 11 15 21 1 19 13 8 14 22 1 24 13 9 14 17 0 22 16 12 14 24 1 25 13 10 8 25 0 26 12 10 13 26 1 29 14 12 15 25 1 32 11 8 13 17 0 25 9 12 11 32 0 29 16 11 15 33 0 28 12 12 15 13 0 17 10 7 9 32 1 28 13 11 13 25 0 29 16 11 16 29 0 26 14 12 13 22 1 25 15 9 11 18 0 14 5 15 12 17 0 25 8 11 12 20 1 26 11 11 12 15 1 20 16 11 14 20 1 18 17 11 14 33 1 32 9 15 8 29 1 25 9 11 13 23 0 25 13 12 16 26 1 23 10 12 13 18 0 21 6 9 11 20 0 20 12 12 14 11 1 15 8 12 13 28 0 30 14 13 13 26 1 24 12 11 13 22 1 26 11 9 12 17 1 24 16 9 16 12 0 22 8 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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
CoM[t] = + 13.6486392323600 -0.745977696548505GENDER[t] + 0.583058986338514PersSt[t] -0.087313326112899Popularity[t] -0.135563432124363FindFrie[t] -0.158138000123378`Liked `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)13.64863923236004.1582063.28230.0012810.00064
GENDER-0.7459776965485050.864467-0.86290.3895520.194776
PersSt0.5830589863385140.0991485.880700
Popularity-0.0873133261128990.17293-0.50490.6143660.307183
FindFrie-0.1355634321243630.237003-0.5720.5681840.284092
`Liked `-0.1581380001233780.231885-0.6820.4963120.248156


Multiple Linear Regression - Regression Statistics
Multiple R0.460249477153909
R-squared0.211829581220446
Adjusted R-squared0.185557233927794
F-TEST (value)8.06283423634909
F-TEST (DF numerator)5
F-TEST (DF denominator)150
p-value9.26157895819735e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.14761948252781
Sum Squared Residuals3974.69795053498


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12421.94288534924752.05711465075250
22522.74882109382322.25117890617675
31725.1988889110557-8.19888891105572
41820.5612731688371-2.56127316883714
51821.761673651529-3.76167365152899
61621.1577821349311-5.15778213493108
72021.5606276827433-1.56062768274330
81622.1609190997317-6.16091909973167
91817.92621120299180.0737887970082426
101721.9498310678218-4.94983106782178
112320.87456422320072.12543577679927
123019.495918502028410.5040814979716
132317.85410838101905.14589161898096
141817.82486798321580.175132016784232
151521.3988895830104-6.39888958301039
161225.0645060894084-13.0645060894084
172122.0783864837054-1.07838648370539
181515.8216950236280-0.821695023628023
192022.6883639161999-2.68836391619988
203123.10067623869227.89932376130781
212722.82268444018074.17731555981929
223419.973932602008114.0260673979919
232119.94775793439961.05224206560044
243118.983684189700412.0163158102996
251920.4048772064534-1.40487720645338
261620.9819125745618-4.98191257456175
272023.5760262005881-3.57602620058806
282119.54726957805331.45273042194666
292222.3270010776215-0.327001077621547
301721.2382305267812-4.23823052678124
312423.72332463257600.276675367424035
322524.3489846409590.651015359041007
332624.59015438670481.40984561329525
342527.4598010528032-2.4598010528032
351724.0730147689572-7.0730147689572
363225.29706886315186.70293113684818
373324.92769974914058.07230025085946
381320.3153227130048-7.31532271300477
393224.54624815885037.45375184114975
402525.1389308630284-0.138930863028443
412923.90323112448455.09676887551553
422223.2098474121044-1.20984741210440
431817.44379092718870.556209072811322
441724.1377535270711-7.13775352707109
452023.7128948385224-3.7128948385224
461519.4616982896801-4.46169828968007
472018.20826699089011.79173300910986
483327.47617368077535.52382631922466
492923.14632450428635.85367549571369
502322.93307146388870.06692853611128
512621.7573297733724.24267022662798
521822.4094090983149-4.40940909831494
532020.4213658585558-0.421365858555804
541117.2674845348897-6.26748453488971
552826.09990363771421.90009636228584
562622.30132553960913.69867446039090
572223.9840217027711-1.98402170277113
581721.7487850990361-4.74878509903609
591221.9141625676854-9.91416256768541
601415.8925196976385-1.89251969763850
611723.5064444347211-6.50644443472111
622122.4043484994583-1.40434849945826
631922.5559637517554-3.5559637517554
641821.6357962349107-3.63579623491074
651020.0772354506273-10.0772354506273
662926.81852605617702.18147394382296
673121.2450954610449.75490453895602
681924.7317414370593-5.73174143705926
69918.9885271974535-9.98852719745347
702025.0999692099003-5.09996920990034
712820.45312731246497.54687268753515
721920.3292718223563-1.32927182235629
733023.97967782461426.02032217538584
742922.59682273606036.40317726393971
752623.76592565462052.23407434537952
762319.83352616213073.16647383786932
771320.4391597164682-7.4391597164682
782121.5418978633052-0.541897863305159
791921.9959161653455-2.99591616534555
802824.33495474729593.6650452527041
812324.0895034210596-1.08950342105963
821818.8812411437589-0.881241143758895
832119.48296765186911.5170323481309
842023.3527126104212-3.35271261042115
852319.32129184980263.67870815019736
862120.60207842667820.397921573321803
872124.2037974909950-3.20379749099496
881521.9442442815213-6.94424428152128
892823.38497319392634.61502680607371
901918.55267728758870.447322712411326
912617.57087198264368.42912801735643
921019.2443812598956-9.24438125989557
931617.2606818982934-1.26068189829341
942221.00883102071770.991168979282265
951920.7102865807169-1.71028658071693
963127.32113665066543.6788633493346
973121.44365561354269.5563443864574
982921.85066671771517.14933328228494
991919.7266769403657-0.72667694036575
1002218.58009486334083.41990513665925
1012321.64057694499741.35942305500264
1021518.5849378710938-3.58493787109381
1032019.34306034158780.656939658412232
1041820.7750253388308-2.77502533883082
1052322.02355133220120.976448667798765
1062517.29974511839487.70025488160516
1072119.94645272858961.05354727141042
1082419.64110565199254.35889434800752
1092521.46188630338463.53811369661535
1101717.6290256952648-0.629025695264763
1111316.5354744343378-3.53547443433784
1122819.20966191795118.7903380820489
1132122.2530754335976-1.25307543359763
1142528.8344860012843-3.83448600128434
115924.3447030604685-15.3447030604685
1161620.0447572760186-4.04475727601858
1171922.2414297892483-3.24142978924827
1181719.4464254878734-2.44642548787344
1192521.41285717900703.58714282099297
1202015.87118803778304.12881196221698
1212923.33188008016185.66811991983824
1221418.2034239831371-4.20342398313708
1232223.3917758305226-1.39177583052259
1241519.4525114037700-4.45251140377004
1251919.4890535677657-0.489053567765694
1262020.2584471483458-0.258447148345814
1271520.1759768299860-5.17597682998598
1282022.1657621074847-2.16576210748473
1291821.6339918995047-3.63399189950467
1303326.74186011522136.25813988477869
1312221.3420948026630.657905197336996
1321618.1208913671108-2.12089136711079
1331722.0288934695504-5.02889346955039
1341618.1282554309696-2.12825543096963
1352117.82718993486313.17281006513695
1362624.07785777671031.92214222328973
1371819.0532659555674-1.05326595556735
1381821.0112897791571-3.01128977915707
1391720.2350935619806-3.23509356198065
1402221.11263299893310.887367001066946
1413022.46424424981917.53575575018091
1423024.83560571294105.16439428705897
1432420.42620886630893.57379113369113
1442122.1439313180332-1.14393131803316
1452121.5827031211462-0.58270312114622
1462924.69997998315024.30002001684978
1473123.68591409470007.31408590530003
1482020.6142232006236-0.614223200623649
1491613.71842175240782.28157824759218
1502219.16799685743232.83200314256767
1512024.1261078827217-4.12610788272173
1522821.3420948026636.657905197337
1533825.636698449763712.3633015502363
1542219.03069138756832.96930861243166
1552022.2848368875067-2.28483688750668
1561719.2278926077931-2.22789260779315


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.4491498436030040.8982996872060090.550850156396996
100.3101756649664690.6203513299329390.68982433503353
110.3645908466200640.7291816932401270.635409153379936
120.697393536887980.6052129262240390.302606463112020
130.595829959608660.808340080782680.40417004039134
140.5238934850723470.9522130298553070.476106514927653
150.504223479071140.991553041857720.49577652092886
160.4770486192213250.954097238442650.522951380778675
170.4455339580480860.8910679160961710.554466041951914
180.5634088722576260.8731822554847470.436591127742374
190.4838772930644690.9677545861289380.516122706935531
200.6775185915172620.6449628169654770.322481408482738
210.690633736605510.618732526788980.30936626339449
220.931774392885140.1364512142297190.0682256071148595
230.905773930082620.1884521398347590.0942260699173795
240.9604776565442750.07904468691145020.0395223434557251
250.9444228304641060.1111543390717890.0555771695358943
260.9426661218801650.1146677562396700.0573338781198348
270.9245520777478910.1508958445042180.0754479222521089
280.9032088239925720.1935823520148560.096791176007428
290.8734802975582360.2530394048835280.126519702441764
300.8471490588683410.3057018822633180.152850941131659
310.8151049561911730.3697900876176550.184895043808827
320.8044072883393210.3911854233213570.195592711660679
330.7984505278840330.4030989442319340.201549472115967
340.7617204007337520.4765591985324960.238279599266248
350.7473605445109430.5052789109781140.252639455489057
360.8435418505125880.3129162989748240.156458149487412
370.9166226895595550.1667546208808910.0833773104404453
380.9346022846857270.1307954306285450.0653977153142727
390.9516956822920240.09660863541595220.0483043177079761
400.9365301978020650.1269396043958710.0634698021979354
410.938117870369360.1237642592612810.0618821296306405
420.9220508731703170.1558982536593650.0779491268296826
430.902055221483580.1958895570328390.0979447785164195
440.906043463652240.1879130726955200.0939565363477602
450.8911817882692720.2176364234614570.108818211730729
460.8982465392377010.2035069215245970.101753460762299
470.8754521155019790.2490957689960420.124547884498021
480.894419438285010.2111611234299780.105580561714989
490.8999562162363050.2000875675273910.100043783763695
500.875923900896260.2481521982074810.124076099103741
510.8643946419461460.2712107161077070.135605358053854
520.851099686286660.2978006274266790.148900313713340
530.8204261908549440.3591476182901130.179573809145057
540.8376297937383420.3247404125233160.162370206261658
550.810353577365330.3792928452693410.189646422634671
560.7910082881672430.4179834236655150.208991711832757
570.7590315466942270.4819369066115450.240968453305773
580.7596034632722880.4807930734554250.240396536727712
590.8329231455748480.3341537088503050.167076854425152
600.8085526149201420.3828947701597160.191447385079858
610.8207240211811650.3585519576376690.179275978818834
620.790574238144510.418851523710980.20942576185549
630.7736376608158850.4527246783682300.226362339184115
640.7588850077182970.4822299845634050.241114992281702
650.845519447364460.3089611052710820.154480552635541
660.8207770727515570.3584458544968850.179222927248443
670.8898050917684240.2203898164631520.110194908231576
680.8962365406539960.2075269186920070.103763459346003
690.946386843164080.1072263136718390.0536131568359194
700.9495631797042430.1008736405915130.0504368202957566
710.9610456792470150.07790864150597080.0389543207529854
720.9509174950627850.09816500987442980.0490825049372149
730.9561705970847930.08765880583041360.0438294029152068
740.9637367434015940.07252651319681170.0362632565984058
750.9554088282464820.08918234350703610.0445911717535181
760.9477255026024120.1045489947951770.0522744973975885
770.9619920064610920.07601598707781550.0380079935389078
780.9511828613338330.09763427733233450.0488171386661673
790.9439092182528870.1121815634942260.0560907817471131
800.9370958509105040.1258082981789920.0629041490894958
810.9249433597110190.1501132805779620.0750566402889811
820.9072401981265030.1855196037469930.0927598018734967
830.8874514742207570.2250970515584860.112548525779243
840.8755435643315950.2489128713368100.124456435668405
850.8612489563854840.2775020872290320.138751043614516
860.8349572652457640.3300854695084710.165042734754236
870.8229919817467080.3540160365065840.177008018253292
880.848894776791860.3022104464162800.151105223208140
890.845372053007920.3092558939841590.154627946992079
900.8161381082691370.3677237834617270.183861891730863
910.8713294236818850.257341152636230.128670576318115
920.925509281425830.1489814371483410.0744907185741704
930.9081598659307190.1836802681385630.0918401340692813
940.887183008953340.2256339820933210.112816991046660
950.8670184427574990.2659631144850030.132981557242501
960.8507867746898670.2984264506202650.149213225310133
970.9083832312243140.1832335375513720.091616768775686
980.9140074624598290.1719850750803430.0859925375401715
990.894911950939650.21017609812070.10508804906035
1000.8808801911268050.2382396177463890.119119808873195
1010.8559027527785250.288194494442950.144097247221475
1020.838123400757830.3237531984843390.161876599242170
1030.8054072412480540.3891855175038930.194592758751946
1040.7825940235322910.4348119529354170.217405976467709
1050.7552689461451430.4894621077097150.244731053854857
1060.8183340630504850.363331873899030.181665936949515
1070.7852686280215670.4294627439568650.214731371978433
1080.7699353953064550.4601292093870890.230064604693545
1090.7424890856327060.5150218287345890.257510914367294
1100.7042887501850340.5914224996299330.295711249814966
1110.6929379665844080.6141240668311850.307062033415592
1120.7617074298008420.4765851403983150.238292570199158
1130.7208046707166550.558390658566690.279195329283345
1140.7015537133247730.5968925733504540.298446286675227
1150.9609176195866510.07816476082669710.0390823804133485
1160.9571702924958020.08565941500839520.0428297075041976
1170.9551225572327140.08975488553457170.0448774427672859
1180.9422621281135840.1154757437728320.057737871886416
1190.9299004406599420.1401991186801150.0700995593400577
1200.9409691091652440.1180617816695110.0590308908347557
1210.936351775418220.1272964491635620.0636482245817809
1220.9253741288168360.1492517423663270.0746258711831637
1230.9120740814338440.1758518371323120.0879259185661562
1240.9071257626835830.1857484746328330.0928742373164166
1250.8770329829754560.2459340340490880.122967017024544
1260.8411380472131520.3177239055736970.158861952786848
1270.8584403691888940.2831192616222120.141559630811106
1280.8484657428407520.3030685143184960.151534257159248
1290.8616802960826170.2766394078347650.138319703917383
1300.840912484291310.318175031417380.15908751570869
1310.8012222618699340.3975554762601330.198777738130066
1320.7489281977765790.5021436044468420.251071802223421
1330.8650971702767160.2698056594465680.134902829723284
1340.8296913950126360.3406172099747280.170308604987364
1350.8232880634989860.3534238730020290.176711936501014
1360.765210407639140.469579184721720.23478959236086
1370.7088201437265340.5823597125469330.291179856273466
1380.7595843934672220.4808312130655560.240415606532778
1390.6863226478047080.6273547043905840.313677352195292
1400.6756059663981970.6487880672036050.324394033601802
1410.7338311553969050.5323376892061890.266168844603095
1420.6446041980607630.7107916038784750.355395801939238
1430.6075845422291540.7848309155416930.392415457770846
1440.5026924800737420.9946150398525160.497307519926258
1450.4620137509115280.9240275018230560.537986249088472
1460.3768758897466330.7537517794932660.623124110253367
1470.3110585836709050.622117167341810.688941416329095


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 level120.0863309352517986OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/108pds1292326315.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/108pds1292326315.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/1joyh1292326315.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/1joyh1292326315.ps (open in new window)


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/7fywp1292326315.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/7fywp1292326315.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/8fywp1292326315.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292326261r4lz47sx4z3uxdz/8fywp1292326315.ps (open in new window)


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