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:14:51 +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/t1293203568qz9abkg562u18i9.htm/, Retrieved Fri, 24 Dec 2010 16:12:48 +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/t1293203568qz9abkg562u18i9.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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -0.230262856605776 + 0.124421759330556FindingFriends[t] + 0.242447469145869KnowingPeople[t] + 0.352480645391409Liked[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.2302628566057761.496946-0.15380.877960.43898
FindingFriends0.1244217593305560.0982381.26650.2073130.103657
KnowingPeople0.2424474691458690.0616133.9350.0001286.4e-05
Liked0.3524806453914090.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.50811602777696
21210.93714875555081.06285124444918
3910.5816936253995-1.58169362539954
41011.9428237148048-1.94282371480476
51313.1473958604014-0.147395860401417
61615.29880363022770.701196369772291
71412.89265936359501.10734063640503
81614.27328390816291.72671609183711
91011.0390775405863-1.03907754058634
10810.3179128675937-2.31791286759371
111212.8106095672703-0.810609567270255
121515.3967329281444-0.396732928144397
131410.99117955898243.00882044101760
141412.01856829243441.98143170756563
151212.6206110036536-0.620611003653647
161210.95029222239091.04970777760915
17109.249109246540930.750890753459065
1846.55027417147198-2.55027417147198
191414.8774888868817-0.877488886881719
201514.24510953208460.754890467915424
211613.71250760834642.28749239165361
221211.20193242873410.798067571265851
231212.1330708614301-0.133070861430109
241210.69034774077841.30965225922162
251210.72631435462401.27368564537604
261212.4458643738576-0.445864373857619
27117.884890772643213.11510922735679
281113.9680223233188-2.96802232331881
291111.7675713941754-0.767571394175375
301111.4255678165932-0.425567816593165
311111.1459749685375-0.145974968537523
32119.050666843013221.94933315698678
331514.57388811165160.426111888348367
341514.99392741228750.00607258771248316
35914.2177051346886-5.21770513468858
361610.41901124782225.58098875217777
37138.280203987026814.71979601297319
38910.7569459460289-1.75694594602893
391614.20054130248481.79945869751516
401213.0951983771543-1.09519837715433
41158.408134301024736.59186569897527
4259.36799568762837-4.36799568762837
431111.2035196131437-0.203519613143663
441713.51799774691463.4820022530854
4598.19249771517370.807502284826293
461315.2231498834182-2.22314988341823
471614.06939031337621.93060968662382
481613.76415643553382.23584356446622
491413.73405832019420.265941679805817
501613.48085824835412.51914175164585
511113.2499937867094-2.24999378670944
521111.741251443332-0.741251443331996
531113.7720367233744-2.7720367233744
541212.6262885060021-0.626288506002134
551213.4635522320450-1.46355223204504
561212.3861863945427-0.386186394542674
571413.91167747059700.0883225294030302
581011.3451145043230-1.34511450432298
5999.02358910698186-0.0235891069818569
601211.64896932129870.351030678701326
611010.4042439780149-0.404243978014899
621413.41912317899830.580876821001678
63810.3134434748435-2.31344347484351
641614.36858902896791.63141097103211
651415.5859836000602-1.58598360006016
661410.78433820450653.21566179549352
671211.17524267907010.824757320929883
681413.39728720705740.602712792942648
69710.4318878855802-3.43188788558019
701914.51576170377394.48423829622612
711512.77711534874572.22288465125434
72811.3037151302295-3.30371513022951
731014.6807010008753-4.68070100087534
741313.27157181747-0.271571817470007
751311.50509746570611.49490253429386
761010.7766485247344-0.776648524734444
77129.410449181809332.58955081819067
781516.6511419410771-1.65114194107707
79711.1576034824981-4.15760348249814
801414.1882464279985-0.188246427998494
81108.722984903493121.27701509650688
8269.87486234129855-3.87486234129855
831111.6748290542446-0.674829054244613
84129.787156069445452.21284393055455
851414.1315864589884-0.131586458988351
861213.5195849313241-1.51958493132412
871414.2121394899803-0.212139489980343
881110.32287572221020.67712427778976
89109.239989152616970.760010847383033
901312.74943482262260.250565177377419
91810.2994432662147-2.29944326621474
92912.3323261542906-3.3323261542906
93612.4117877982193-6.4117877982193
941212.5942910528103-0.594291052810268
951412.2878935898981.712106410102
961110.97860878257450.0213912174254614
97810.0902419679002-2.09024196790019
9879.6528966509552-2.6528966509552
9999.51567349294914-0.515673492949142
1001413.01336990345220.986630096547774
1011310.35630637030082.64369362969918
1021512.63140911280732.36859088719273
10355.66587982304402-0.66587982304402
1041512.00365314027112.99634685972888
1051312.05101176546040.948988234539627
1061211.63932265829650.360677341703525
10768.18219945002766-2.18219945002766
108710.0437707990537-3.04377079905372
109139.567126335512163.43287366448784
1101615.52799577489330.472004225106696
1111013.2648729141570-3.26487291415702
1121615.53568545466530.464314545334663
1131513.59607838258561.40392161741439
11488.80344751540832-0.803447515408321
1151112.9339795991712-1.93397959917119
1161312.46730022051280.532699779487186
1171615.08154285332050.918457146679522
118118.51655885429732.48344114570271
1191414.3790357703120-0.379035770311963
120910.1101658692283-1.11016586922833
121810.1606632502643-2.16066325026429
122811.2847849228642-3.28478492286419
1231112.0080673388279-1.00806733882794
1241213.1924028358116-1.19240283581159
1251111.8712206598241-0.871220659824114
1261413.82254078459190.177459215408067
1271112.962784084254-1.96278408425400
1281412.62223781417331.3777621858267
1291313.7321286558768-0.732128655876788
1301211.02714617282800.972853827172018
13146.48379112945435-2.48379112945435
1321512.42992421933542.57007578066460
1331011.3488926688192-1.34889266881919
1341313.1412815596335-0.141281559633466
1351513.09634982330571.90365017669425
1361212.5095564264436-0.509556426443611
1371313.7125076083464-0.712507608346393
13888.08659976948447-0.0865997694844746
1391010.7127258498808-0.712725849880818
1401514.07298078730760.927019212692424
1411614.41349043883051.58650956116952
1421615.29323798551950.706762014480532
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.342350001330761
1531213.1692283209965-1.16922832099650
1541111.2909230311990-0.290923031199022
1551615.36332608762070.636673912379299
156910.0834579320176-1.08345793201761


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2784212606525470.5568425213050950.721578739347453
120.2431650259914990.4863300519829980.756834974008501
130.3404026993107370.6808053986214740.659597300689263
140.2423190302165400.4846380604330810.75768096978346
150.1720234125948690.3440468251897380.82797658740513
160.2253994652983080.4507989305966160.774600534701692
170.2002020276965110.4004040553930220.799797972303489
180.2383530427099080.4767060854198160.761646957290092
190.1887465601370540.3774931202741080.811253439862946
200.1324232615460350.2648465230920710.867576738453965
210.1281968614095890.2563937228191780.87180313859041
220.08759865542035620.1751973108407120.912401344579644
230.0588579555908380.1177159111816760.941142044409162
240.04898931356299820.09797862712599640.951010686437002
250.04065573349359890.08131146698719790.959344266506401
260.03128717094482280.06257434188964550.968712829055177
270.03772713579661710.07545427159323420.962272864203383
280.1504142737418970.3008285474837940.849585726258103
290.1158975491005400.2317950982010810.88410245089946
300.08799280180674420.1759856036134880.912007198193256
310.06328088872631910.1265617774526380.93671911127368
320.05667237902011460.1133447580402290.943327620979885
330.04003389424032780.08006778848065550.959966105759672
340.0276826605678980.0553653211357960.972317339432102
350.1223711215158570.2447422430317140.877628878484143
360.37375689484930.74751378969860.6262431051507
370.5604871719148220.8790256561703560.439512828085178
380.5204286890167830.9591426219664350.479571310983217
390.5349044089738120.9301911820523760.465095591026188
400.5170300172314080.9659399655371840.482969982768592
410.8136442981279530.3727114037440940.186355701872047
420.898223173542940.2035536529141220.101776826457061
430.8732553150196780.2534893699606440.126744684980322
440.9129185386093920.1741629227812160.087081461390608
450.8962791568263320.2074416863473370.103720843173668
460.8942868345340330.2114263309319340.105713165465967
470.887707339082060.224585321835880.11229266091794
480.8926267701410810.2147464597178380.107373229858919
490.8672004596846440.2655990806307120.132799540315356
500.8721202636851810.2557594726296380.127879736314819
510.8746702329691070.2506595340617860.125329767030893
520.8548965032578630.2902069934842730.145103496742137
530.884613012427170.2307739751456590.115386987572830
540.8677450999593830.2645098000812350.132254900040617
550.8497566650077160.3004866699845680.150243334992284
560.8198377925622620.3603244148754750.180162207437738
570.7854946649723310.4290106700553380.214505335027669
580.7710727022251050.4578545955497890.228927297774895
590.7400600886526150.5198798226947710.259939911347385
600.7096349056095250.580730188780950.290365094390475
610.6805765146817720.6388469706364550.319423485318228
620.6406138455323570.7187723089352870.359386154467643
630.6949655234408610.6100689531182770.305034476559139
640.685583464719220.628833070561560.31441653528078
650.6713675254812040.6572649490375920.328632474518796
660.7086271156202090.5827457687595820.291372884379791
670.6701973107172990.6596053785654030.329802689282701
680.6275726475758780.7448547048482440.372427352424122
690.7211105744015780.5577788511968440.278889425598422
700.8443281610086970.3113436779826060.155671838991303
710.8416657878714150.3166684242571690.158334212128585
720.8861435567971430.2277128864057140.113856443202857
730.9560401147761270.08791977044774510.0439598852238725
740.9438246049856140.1123507900287720.0561753950143859
750.9344517869264580.1310964261470840.0655482130735418
760.920943128418860.1581137431622810.0790568715811406
770.9297456465611790.1405087068776420.0702543534388212
780.9262660080158450.1474679839683100.0737339919841548
790.9707001532564840.0585996934870320.029299846743516
800.9618533748189190.07629325036216220.0381466251810811
810.955950086110460.088099827779080.04404991388954
820.9745206942316250.05095861153675050.0254793057683752
830.9676515598436730.06469688031265440.0323484401563272
840.9702206025598860.05955879488022720.0297793974401136
850.9610507522144480.07789849557110330.0389492477855516
860.955493003544780.08901399291044070.0445069964552204
870.9447245431401430.1105509137197150.0552754568598574
880.9401138661504860.1197722676990290.0598861338495143
890.938682202274280.1226355954514390.0613177977257194
900.9227770247084270.1544459505831470.0772229752915733
910.9268583159551520.1462833680896950.0731416840448477
920.9632786301777810.07344273964443730.0367213698222187
930.9986461069010680.002707786197863660.00135389309893183
940.998059354227260.003881291545480860.00194064577274043
950.9977055430372960.004588913925409010.00229445696270450
960.9966432529452970.006713494109405790.00335674705470289
970.9967623367558270.006475326488345340.00323766324417267
980.9973774157979930.005245168404013510.00262258420200675
990.9965872670305720.006825465938855860.00341273296942793
1000.9951235713910320.009752857217936270.00487642860896813
1010.9978061973653370.004387605269326280.00219380263466314
1020.9974482619475520.005103476104896970.00255173805244849
1030.996875478318580.006249043362839570.00312452168141978
1040.997179350908690.005641298182620450.00282064909131023
1050.996140439226770.007719121546458120.00385956077322906
1060.9943649641570940.01127007168581110.00563503584290557
1070.9941392513493080.01172149730138420.00586074865069211
1080.9964743942776240.00705121144475280.0035256057223764
1090.9992777911874660.001444417625067210.000722208812533603
1100.9988554232661960.002289153467607240.00114457673380362
1110.9996556713634720.0006886572730553320.000344328636527666
1120.9994238925406230.001152214918753760.000576107459376878
1130.999214382405740.001571235188518710.000785617594259357
1140.9988095157486490.002380968502702970.00119048425135148
1150.998558035606560.002883928786881650.00144196439344082
1160.9976461299313260.004707740137347990.00235387006867399
1170.996301338350730.007397323298541450.00369866164927073
1180.9992891782000810.001421643599837520.000710821799918762
1190.9987842867109060.002431426578188890.00121571328909444
1200.9980213649374060.003957270125187970.00197863506259398
1210.9978186578411930.004362684317613580.00218134215880679
1220.9981432979200360.003713404159927970.00185670207996399
1230.9968920668850610.006215866229877650.00310793311493883
1240.9970951537089440.005809692582112830.00290484629105642
1250.9950992346472720.00980153070545610.00490076535272805
1260.9918693056507950.01626138869841010.00813069434920504
1270.9911039462707880.01779210745842470.00889605372921235
1280.9857893192378640.02842136152427130.0142106807621356
1290.9854705225349240.02905895493015150.0145294774650757
1300.9913271977303660.01734560453926880.00867280226963438
1310.9869360339494250.0261279321011510.0130639660505755
1320.9895110613102520.02097787737949630.0104889386897482
1330.9844754860821360.03104902783572800.0155245139178640
1340.974487381101430.05102523779714180.0255126188985709
1350.9651644848769150.06967103024616980.0348355151230849
1360.961002921755840.0779941564883190.0389970782441595
1370.9576897137242430.08462057255151350.0423102862757567
1380.9286450750554570.1427098498890870.0713549249445434
1390.9259395862852730.1481208274294530.0740604137147266
1400.9026955881794660.1946088236410670.0973044118205335
1410.9947642789552340.01047144208953210.00523572104476607
1420.999627542867430.000744914265138160.00037245713256908
1430.99860230831360.002795383372799130.00139769168639956
1440.9970756843979210.005848631204156920.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/t1293203568qz9abkg562u18i9/10bex01293203680.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203568qz9abkg562u18i9/10bex01293203680.ps (open in new window)


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


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


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


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


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


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


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


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


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