Home » date » 2010 » Dec » 24 »

*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: Fri, 24 Dec 2010 15:52:22 +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/24/t129320582016wxbxld7gwm1lt.htm/, Retrieved Fri, 24 Dec 2010 16:50:32 +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/24/t129320582016wxbxld7gwm1lt.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 «
15 10 12 16 6 1 1 3 12 9 7 12 6 1 0 0 9 12 11 11 4 1 0 3 10 12 11 12 6 1 3 0 13 9 14 14 6 1 1 3 16 11 16 16 7 1 1 0 14 12 13 13 6 1 2 0 16 11 13 14 7 2 0 1 10 12 5 13 6 1 1 1 8 12 8 13 4 0 0 0 12 11 14 13 5 2 1 0 15 11 15 15 8 1 0 2 14 12 8 14 4 1 0 0 14 6 13 12 6 1 0 0 12 13 12 12 6 1 0 1 12 11 11 12 5 0 2 1 10 12 8 11 4 0 3 1 4 10 4 10 2 0 2 0 14 11 15 15 8 0 2 1 15 12 12 16 7 0 0 0 16 12 14 14 6 1 0 0 12 12 9 13 4 2 0 0 12 11 16 13 4 0 0 0 12 12 10 13 4 0 1 0 12 12 8 13 5 0 2 0 12 12 14 14 4 1 0 0 11 6 6 9 4 1 1 0 11 5 16 14 6 3 0 0 11 12 11 12 6 0 1 3 11 14 7 13 6 0 1 2 11 12 13 11 4 1 0 0 11 9 7 13 2 2 0 1 15 11 14 15 7 1 0 0 15 11 17 16 6 1 0 1 9 11 15 15 7 0 2 2 16 12 8 14 4 0 2 1 13 10 8 8 4 0 0 1 9 12 11 11 4 2 2 0 16 11 16 15 6 1 2 0 12 12 10 15 6 1 0 0 15 9 5 11 3 2 1 0 5 15 8 12 3 0 3 0 11 11 8 12 6 1 2 0 17 11 15 14 5 2 0 0 9 15 6 8 4 0 2 1 13 12 16 16 6 2 0 0 16 9 16 16 6 0 1 1 16 12 16 14 6 0 1 0 14 9 19 12 6 1 1 0 16 11 14 15 6 0 1 1 11 12 15 1 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -0.230262856605763 + 0.124421759330556FindingFriends[t] + 0.242447469145869KnowingPeople[t] + 0.352480645391408Liked[t] + 0.633321617244387Celebrity[t] + 0.320786045997284B[t] -0.112460065107071`2B`[t] -0.0264621349487461`3B`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.2302628566057631.496946-0.15380.877960.43898
FindingFriends0.1244217593305560.0982381.26650.2073130.103657
KnowingPeople0.2424474691458690.0616133.9350.0001286.4e-05
Liked0.3524806453914080.0973613.62030.0004030.000202
Celebrity0.6333216172443870.1575594.01969.3e-054.6e-05
B0.3207860459972840.2277081.40880.1610030.080501
`2B`-0.1124600651070710.211909-0.53070.5964220.298211
`3B`-0.02646213494874610.197252-0.13420.8934630.446732


Multiple Linear Regression - Regression Statistics
Multiple R0.712454731757267
R-squared0.507591744803319
Adjusted R-squared0.484302165165638
F-TEST (value)21.7948006232827
F-TEST (DF numerator)7
F-TEST (DF denominator)148
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10885387487063
Sum Squared Residuals658.19517050242


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11513.49188397222301.50811602777697
21210.93714875555081.06285124444918
3910.5816936253995-1.58169362539954
41011.9428237148048-1.94282371480475
51313.1473958604014-0.147395860401419
61615.29880363022770.70119636977229
71412.89265936359501.10734063640503
81614.27328390816291.72671609183711
91011.0390775405863-1.03907754058634
10810.3179128675937-2.31791286759371
111212.8106095672703-0.810609567270254
121515.3967329281444-0.396732928144398
131410.99117955898243.0088204410176
141412.01856829243441.98143170756563
151212.6206110036536-0.620611003653647
161210.95029222239091.04970777760915
17109.249109246540940.750890753459065
1846.55027417147198-2.55027417147198
191414.8774888868817-0.877488886881718
201514.24510953208460.754890467915425
211613.71250760834642.28749239165361
221211.20193242873410.798067571265853
231212.1330708614301-0.133070861430109
241210.69034774077841.30965225922162
251210.72631435462401.27368564537604
261212.4458643738576-0.445864373857618
27117.884890772643223.11510922735678
281113.9680223233188-2.96802232331881
291111.7675713941754-0.767571394175375
301111.4255678165932-0.425567816593164
311111.1459749685375-0.145974968537524
32119.050666843013221.94933315698678
331514.57388811165160.426111888348367
341514.99392741228750.00607258771248438
35914.2177051346886-5.21770513468858
361610.41901124782225.58098875217777
37138.280203987026814.71979601297319
38910.7569459460289-1.75694594602893
391614.20054130248481.79945869751516
401213.0951983771543-1.09519837715432
41158.408134301024736.59186569897527
4259.36799568762837-4.36799568762837
431111.2035196131437-0.203519613143663
441713.51799774691463.4820022530854
4598.19249771517370.807502284826292
461315.2231498834182-2.22314988341823
471614.06939031337621.93060968662382
481613.76415643553382.23584356446622
491413.73405832019420.265941679805815
501613.48085824835412.51914175164585
511113.2499937867094-2.24999378670945
521111.741251443332-0.741251443331995
531113.7720367233744-2.77203672337440
541212.6262885060021-0.626288506002135
551213.4635522320450-1.46355223204504
561212.3861863945427-0.386186394542673
571413.91167747059700.0883225294030321
581011.3451145043230-1.34511450432298
5999.02358910698186-0.023589106981859
601211.64896932129870.351030678701326
611010.4042439780149-0.4042439780149
621413.41912317899830.580876821001681
63810.3134434748435-2.31344347484351
641614.36858902896791.63141097103211
651415.5859836000602-1.58598360006015
661410.78433820450653.21566179549352
671211.17524267907010.824757320929884
681413.39728720705740.602712792942648
69710.4318878855802-3.43188788558019
701914.51576170377394.48423829622612
711512.77711534874572.22288465125434
72811.3037151302295-3.30371513022950
731014.6807010008753-4.68070100087534
741313.2715718174700-0.271571817470007
751311.50509746570611.49490253429386
761010.7766485247344-0.776648524734446
77129.410449181809332.58955081819067
781516.6511419410771-1.65114194107706
79711.1576034824981-4.15760348249814
801414.1882464279985-0.188246427998494
81108.722984903493121.27701509650688
8269.87486234129855-3.87486234129855
831111.6748290542446-0.674829054244615
84129.787156069445452.21284393055455
851414.1315864589883-0.131586458988350
861213.5195849313241-1.51958493132412
871414.2121394899803-0.212139489980342
881110.32287572221020.677124277789761
89109.239989152616970.76001084738303
901312.74943482262260.250565177377418
91810.2994432662147-2.29944326621474
92912.3323261542906-3.3323261542906
93612.4117877982193-6.4117877982193
941212.5942910528103-0.594291052810267
951412.2878935898981.712106410102
961110.97860878257450.0213912174254618
97810.0902419679002-2.09024196790019
9879.6528966509552-2.6528966509552
9999.51567349294914-0.515673492949142
1001413.01336990345220.986630096547776
1011310.35630637030082.64369362969918
1021512.63140911280732.36859088719273
10355.66587982304402-0.665879823044024
1041512.00365314027112.99634685972888
1051312.05101176546040.948988234539627
1061211.63932265829650.360677341703524
10768.18219945002766-2.18219945002766
108710.0437707990537-3.04377079905372
109139.567126335512163.43287366448784
1101615.52799577489330.472004225106696
1111013.2648729141570-3.26487291415702
1121615.53568545466530.464314545334665
1131513.59607838258561.40392161741439
11488.80344751540832-0.803447515408322
1151112.9339795991712-1.93397959917119
1161312.46730022051280.532699779487187
1171615.08154285332050.918457146679522
118118.51655885429732.48344114570270
1191414.3790357703120-0.379035770311962
120910.1101658692283-1.11016586922833
121810.1606632502643-2.16066325026429
122811.2847849228642-3.28478492286419
1231112.0080673388279-1.00806733882794
1241213.1924028358116-1.19240283581159
1251111.8712206598241-0.871220659824113
1261413.82254078459190.177459215408068
1271112.962784084254-1.96278408425399
1281412.62223781417331.3777621858267
1291313.7321286558768-0.732128655876788
1301211.02714617282800.97285382717202
13146.48379112945436-2.48379112945436
1321512.42992421933542.57007578066459
1331011.3488926688192-1.34889266881919
1341313.1412815596335-0.141281559633465
1351513.09634982330571.90365017669425
1361212.5095564264436-0.509556426443611
1371313.7125076083464-0.712507608346393
13888.08659976948448-0.0865997694844794
1391010.7127258498808-0.712725849880818
1401514.07298078730760.927019212692424
1411614.41349043883051.58650956116952
1421615.29323798551950.706762014480534
1431413.01046375078770.989536249212332
1441412.88312455823301.11687544176698
1451210.00667092660341.99332907339660
1461512.06143118789172.93856881210832
1471312.23425077283380.765749227166247
1481613.58808584901582.41191415098416
1491413.60770689654620.392293103453768
150810.0834579320176-2.08345793201762
1511613.63416903149502.36583096850502
1521615.65764999866920.342350001330762
1531213.1692283209965-1.16922832099650
1541111.2909230311990-0.290923031199022
1551615.36332608762070.636673912379299
156910.0834579320176-1.08345793201762


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2784212606525460.5568425213050930.721578739347454
120.2431650259914980.4863300519829960.756834974008502
130.3404026993107370.6808053986214740.659597300689263
140.2423190302165410.4846380604330830.757680969783459
150.1720234125948690.3440468251897380.827976587405131
160.2253994652983080.4507989305966170.774600534701692
170.2002020276965110.4004040553930210.79979797230349
180.2383530427099080.4767060854198160.761646957290092
190.1887465601370540.3774931202741080.811253439862946
200.1324232615460350.264846523092070.867576738453965
210.1281968614095890.2563937228191780.871803138590411
220.08759865542035620.1751973108407120.912401344579644
230.05885795559083830.1177159111816770.941142044409162
240.0489893135629980.0979786271259960.951010686437002
250.04065573349359910.08131146698719820.9593442665064
260.03128717094482280.06257434188964550.968712829055177
270.03772713579661730.07545427159323460.962272864203383
280.1504142737418960.3008285474837920.849585726258104
290.1158975491005400.2317950982010800.88410245089946
300.08799280180674420.1759856036134880.912007198193256
310.06328088872631870.1265617774526370.936719111273681
320.05667237902011470.1133447580402290.943327620979885
330.04003389424032770.08006778848065540.959966105759672
340.02768266056789820.05536532113579630.972317339432102
350.1223711215158570.2447422430317150.877628878484143
360.37375689484930.74751378969860.6262431051507
370.5604871719148220.8790256561703570.439512828085178
380.5204286890167830.9591426219664340.479571310983217
390.5349044089738130.9301911820523730.465095591026187
400.517030017231410.965939965537180.48296998276859
410.8136442981279530.3727114037440940.186355701872047
420.8982231735429390.2035536529141220.101776826457061
430.8732553150196780.2534893699606440.126744684980322
440.9129185386093920.1741629227812160.0870814613906079
450.8962791568263320.2074416863473360.103720843173668
460.8942868345340330.2114263309319340.105713165465967
470.887707339082060.2245853218358810.112292660917941
480.892626770141080.2147464597178380.107373229858919
490.8672004596846450.2655990806307110.132799540315355
500.8721202636851820.2557594726296360.127879736314818
510.8746702329691060.2506595340617870.125329767030894
520.8548965032578630.2902069934842730.145103496742136
530.884613012427170.230773975145660.11538698757283
540.8677450999593830.2645098000812340.132254900040617
550.8497566650077170.3004866699845670.150243334992283
560.8198377925622630.3603244148754740.180162207437737
570.785494664972330.4290106700553410.214505335027670
580.7710727022251050.4578545955497890.228927297774895
590.7400600886526110.5198798226947780.259939911347389
600.7096349056095250.5807301887809490.290365094390475
610.6805765146817740.6388469706364510.319423485318226
620.6406138455323580.7187723089352850.359386154467642
630.6949655234408610.6100689531182770.305034476559139
640.685583464719220.6288330705615590.314416535280780
650.6713675254812040.6572649490375920.328632474518796
660.708627115620210.5827457687595810.291372884379790
670.6701973107172980.6596053785654040.329802689282702
680.6275726475758780.7448547048482430.372427352424121
690.721110574401580.557778851196840.27888942559842
700.8443281610086980.3113436779826030.155671838991302
710.8416657878714140.3166684242571710.158334212128586
720.8861435567971440.2277128864057130.113856443202856
730.9560401147761270.0879197704477450.0439598852238725
740.9438246049856140.1123507900287720.0561753950143861
750.9344517869264580.1310964261470830.0655482130735416
760.920943128418860.1581137431622790.0790568715811395
770.9297456465611780.1405087068776430.0702543534388217
780.9262660080158460.1474679839683070.0737339919841536
790.9707001532564840.05859969348703170.0292998467435159
800.9618533748189180.07629325036216320.0381466251810816
810.955950086110460.08809982777908010.0440499138895401
820.9745206942316250.05095861153675010.0254793057683751
830.9676515598436730.06469688031265410.0323484401563271
840.9702206025598870.05955879488022670.0297793974401134
850.9610507522144480.07789849557110350.0389492477855517
860.955493003544780.0890139929104410.0445069964552205
870.9447245431401430.1105509137197140.0552754568598569
880.9401138661504860.1197722676990270.0598861338495137
890.938682202274280.1226355954514390.0613177977257193
900.9227770247084260.1544459505831490.0772229752915743
910.9268583159551520.1462833680896960.0731416840448481
920.9632786301777810.07344273964443740.0367213698222187
930.9986461069010680.002707786197863650.00135389309893182
940.998059354227260.003881291545480850.00194064577274042
950.9977055430372950.004588913925409030.00229445696270451
960.9966432529452970.006713494109405790.00335674705470289
970.9967623367558270.006475326488345350.00323766324417267
980.9973774157979930.005245168404013550.00262258420200677
990.9965872670305720.006825465938855860.00341273296942793
1000.9951235713910320.009752857217936230.00487642860896812
1010.9978061973653370.004387605269326240.00219380263466312
1020.9974482619475520.005103476104896970.00255173805244849
1030.996875478318580.00624904336283960.0031245216814198
1040.997179350908690.005641298182620390.00282064909131019
1050.996140439226770.007719121546458120.00385956077322906
1060.9943649641570950.0112700716858110.0056350358429055
1070.9941392513493080.01172149730138410.00586074865069205
1080.9964743942776240.007051211444752760.00352560572237638
1090.9992777911874660.001444417625067210.000722208812533604
1100.9988554232661960.002289153467607210.00114457673380361
1110.9996556713634720.0006886572730553270.000344328636527663
1120.9994238925406230.001152214918753740.000576107459376872
1130.999214382405740.001571235188518710.000785617594259355
1140.9988095157486490.002380968502702950.00119048425135147
1150.998558035606560.002883928786881650.00144196439344082
1160.9976461299313260.004707740137348030.00235387006867402
1170.996301338350730.007397323298541450.00369866164927072
1180.9992891782000810.001421643599837530.000710821799918765
1190.9987842867109060.002431426578188880.00121571328909444
1200.9980213649374060.003957270125187950.00197863506259398
1210.9978186578411930.004362684317613590.00218134215880679
1220.9981432979200360.003713404159927940.00185670207996397
1230.9968920668850610.00621586622987770.00310793311493885
1240.9970951537089440.005809692582112860.00290484629105643
1250.9950992346472720.00980153070545610.00490076535272805
1260.9918693056507950.01626138869840990.00813069434920495
1270.9911039462707880.01779210745842470.00889605372921236
1280.9857893192378640.02842136152427130.0142106807621356
1290.9854705225349240.02905895493015140.0145294774650757
1300.9913271977303660.01734560453926870.00867280226963433
1310.9869360339494240.02612793210115120.0130639660505756
1320.9895110613102520.02097787737949640.0104889386897482
1330.9844754860821360.0310490278357280.015524513917864
1340.974487381101430.05102523779714160.0255126188985708
1350.9651644848769150.06967103024616990.0348355151230849
1360.961002921755840.07799415648831880.0389970782441594
1370.9576897137242430.08462057255151340.0423102862757567
1380.9286450750554560.1427098498890870.0713549249445435
1390.9259395862852740.1481208274294530.0740604137147265
1400.9026955881794660.1946088236410670.0973044118205335
1410.9947642789552340.01047144208953250.00523572104476626
1420.9996275428674310.0007449142651381720.000372457132569086
1430.99860230831360.002795383372799120.00139769168639956
1440.9970756843979220.005848631204156930.00292431560207846
1450.9855141984429170.02897160311416530.0144858015570826


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level340.251851851851852NOK
5% type I error level460.340740740740741NOK
10% type I error level660.488888888888889NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/100dij1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/100dij1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/1tc3p1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/1tc3p1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/24m2a1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/24m2a1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/34m2a1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/34m2a1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/44m2a1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/44m2a1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/5fdkv1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/5fdkv1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/6fdkv1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/6fdkv1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/7pm1y1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/7pm1y1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/8pm1y1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/8pm1y1293205930.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/90dij1293205930.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t129320582016wxbxld7gwm1lt/90dij1293205930.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