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:55:06 +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/t1293205977dv8gbk52zhvcrzd.htm/, Retrieved Fri, 24 Dec 2010 16:53:09 +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/t1293205977dv8gbk52zhvcrzd.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 2 0 0 9 12 9 7 12 6 1 1 2 9 9 12 11 11 4 1 2 1 9 10 12 11 12 6 0 0 0 9 13 9 14 14 6 0 0 0 9 16 11 16 16 7 1 0 0 9 14 12 13 13 6 0 0 0 9 16 11 13 14 7 1 1 0 9 10 12 5 13 6 0 0 0 9 8 12 8 13 4 2 0 1 10 12 11 14 13 5 1 0 0 10 15 11 15 15 8 0 0 0 10 14 12 8 14 4 0 1 0 10 14 6 13 12 6 1 1 2 10 12 13 12 12 6 1 2 1 10 12 11 11 12 5 0 0 0 10 10 12 8 11 4 0 0 0 10 4 10 4 10 2 0 0 0 10 14 11 15 15 8 0 1 0 10 15 12 12 16 7 0 0 0 10 16 12 14 14 6 0 0 0 10 12 12 9 13 4 0 1 0 10 12 11 16 13 4 0 0 0 10 12 12 10 13 4 0 0 1 10 12 12 8 13 5 1 0 1 9 12 12 14 14 4 0 0 0 9 11 6 6 9 4 3 2 1 9 11 5 16 14 6 1 0 0 9 11 12 11 12 6 1 1 0 9 11 14 7 13 6 1 1 0 9 11 12 13 11 4 3 1 1 9 11 9 7 13 2 0 0 0 9 15 11 14 15 7 0 0 0 9 15 11 17 16 6 0 0 0 9 9 11 15 15 7 0 0 0 9 16 12 8 14 4 0 0 0 9 13 10 8 8 4 0 2 1 9 9 12 11 11 4 1 0 0 9 16 11 16 15 6 0 0 0 9 12 12 10 15 6 0 0 0 9 15 9 5 11 3 0 0 2 9 5 15 8 12 3 0 0 0 9 11 11 8 12 6 2 2 0 9 17 11 15 14 5 2 2 0 9 9 15 6 8 4 0 1 1 9 13 12 16 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 time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 1.65207643482502 + 0.118875597665322FindingFriends[t] + 0.240875196872858KnowingPeople[t] + 0.379030919193094Liked[t] + 0.607799529613716Celebrity[t] -0.0468917198450873B[t] + 0.165306614305527`2B`[t] + 0.499352685427422`3B`[t] -0.214487341055989Month[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.652076434825023.681470.44880.654270.327135
FindingFriends0.1188755976653220.0966031.23060.2204530.110226
KnowingPeople0.2408751968728580.061743.90150.0001457.3e-05
Liked0.3790309191930940.0977853.87620.0001598e-05
Celebrity0.6077995296137160.1567693.8770.0001597.9e-05
B-0.04689171984508730.223691-0.20960.8342490.417125
`2B`0.1653066143055270.2693630.61370.5403660.270183
`3B`0.4993526854274220.3171351.57460.1175040.058752
Month-0.2144873410559890.363362-0.59030.5559060.277953


Multiple Linear Regression - Regression Statistics
Multiple R0.716996814212143
R-squared0.514084431590363
Adjusted R-squared0.487640046915008
F-TEST (value)19.4402115194413
F-TEST (DF numerator)8
F-TEST (DF denominator)147
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10201796085084
Sum Squared Residuals649.51648763771


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11513.41845714953031.58154285046974
21211.78998559573370.210014404266271
3911.1814371266787-2.1814371266787
41011.9929929109058-1.99299291090584
51313.1170535469146-0.117053546914642
61615.15552478414580.844475215854184
71412.85377422384471.14622577615535
81613.84014396944662.15985603055342
91010.9267726488618-0.926772648861791
10810.6248810849342-2.62488108493419
111212.1065952325374-0.106595232537396
121514.97582257648270.0241774235173207
131410.76364937269563.23635062730444
141412.66412264291891.33587735708108
151212.9213305585814-0.921330558581422
161211.05183044257080.948169557429184
17109.461250000810750.538749999189246
1846.66536803956815-2.66536803956815
191415.1411291907882-1.14112919078821
201514.14330397310880.856696026891195
211613.25919299885462.74080700114538
221210.62549365037531.37450634962467
231212.0274378165145-0.0274378165144826
241211.20041491837010.799585081629921
251211.49405967544900.505940324551018
261212.2580812806832-0.258081280683172
27118.411962278246122.58803772175388
281113.0764098301540-2.07640983015398
291112.1114078053663-1.11140780536628
301111.7646891323986-0.76468913239859
311111.4040974664287-0.404097466428718
32118.620698131156682.37930186884333
331514.34163519105210.658364808947906
341514.83549217125000.164507828749955
35914.5825103879250-5.58251038792495
361610.81283009944605.18716990055398
37139.130859302995293.86914069700471
38910.3514712126402-1.35147121264023
391614.21558605518411.78441394481591
401212.8892104716123-0.889210471612268
41158.987390799493336.01260920050667
4259.8035955244421-4.80359552444209
431111.3883215115428-0.388321511542827
441713.22471019842533.77528980157470
4599.07818028327066-0.078180283270659
461314.7134925720425-1.71349257204251
471614.14237843799061.85762156200945
481613.74094339260032.25905660739967
491414.2538022830014-0.25380228300142
501613.47245660053732.5275433994627
511112.7420063573413-1.74200635734129
521111.809892280957-0.809892280957004
531113.6830321704420-2.68303217044197
541212.1606604905852-0.160660490585163
551213.7388048564222-1.73880485642224
561212.0122072285200-0.0122072285200334
571413.65750404270260.342495957297375
581010.8391714052153-0.83917140521532
5999.2939567125634-0.293956712563391
601212.2127734949162-0.212773494916232
61109.962280519211380.0377194807886161
621412.93487845208411.06512154791595
6389.87703212260633-1.87703212260633
641614.44000692468921.55999307531080
651415.6888017417311-1.68880174173112
661410.68490610983003.31509389017004
671211.18281262668840.817187373311627
681413.33430087821710.665699121782935
69711.0546249546423-4.05462495464228
701913.87909911492065.12090088507943
711512.80165577801342.19834422198663
72811.2061422880038-3.20614228800375
731014.2357259079165-4.23572590791653
741312.88733561786420.112664382135799
751311.39012642954171.60987357045832
761010.5275360698955-0.527536069895532
77129.206093534573262.79390646542674
781517.4706883670544-2.4706883670544
79711.2091285240368-4.20912852403683
801414.3537417775043-0.353741777504329
81108.557924708942371.44207529105762
8269.81815439332957-3.81815439332957
831111.3779732930419-0.377973293041874
84129.434862144993882.56513785500612
851414.3342299884452-0.334229988445212
861213.4646977550006-1.46469775500058
871414.4605107887174-0.460510788717415
881110.19512657851250.804873421487478
89109.383558010350.616441989650003
901313.4751265084796-0.475126508479611
91810.4176430571402-2.41764305714023
92911.8862238996928-2.88622389969276
93612.0063486451522-6.00634864515223
941213.1214567265049-1.12145672650494
951412.15036295084031.84963704915973
961110.44715491449930.552845085500686
97810.5771103800184-2.57711038001842
9879.23248139039013-2.23248139039013
99910.4396691769144-1.43966917691436
1001412.10301052779031.8969894722097
1011310.20720525274472.79279474725529
1021512.63928688278872.36071311721134
10355.24571583426397-0.24571583426397
1041512.17811840715272.82188159284725
1051312.19679396748050.803206032519526
1061211.55598496251370.44401503748634
10767.71700882799252-1.71700882799252
10879.59940572313099-2.59940572313099
109138.509855799771564.49014420022844
1101614.85336227407031.14663772592974
1111013.2784731235095-3.27847312350953
1121615.10680476060020.893195239399764
1131513.12416127807661.87583872192341
11488.35241995279641-0.352419952796407
1151112.5549219977727-1.55492199777271
1161313.1528090173870-0.15280901738695
1171615.18191263996270.818087360037315
118118.651135523634012.34886447636599
1191414.3882287066421-0.388228706642128
120910.1679098794865-1.16790987948651
121810.2345424271914-2.23454242719139
122811.0763318517117-3.07633185171171
1231111.8381084404744-0.838108440474365
1241213.2533344154868-1.25333441548681
1251111.0064688221712-0.00646882217116818
1261414.5613607063352-0.561360706335221
1271112.643526830619-1.64352683061901
1281412.25620642693511.74379357306490
1291314.689172338863-1.68917233886299
1301210.72439189425801.27560810574196
13145.85078078205209-1.85078078205209
1321512.85041194829332.14958805170674
1331011.3564045967762-1.35640459677622
1341313.8175481192878-0.817548119287846
1351514.13543806729700.86456193270296
1361213.1967164681036-1.19671646810364
1371313.2591929988546-0.259192998854616
13887.810094603260360.189905396739644
1391010.4965022689081-0.496502268908092
1401513.6220677949351.37793220506499
1411614.37207258352941.62792741647057
1421614.86592956372741.13407043627262
1431412.91872232897141.08127767102865
1441413.00002314269100.999976857309033
1451210.60426127200371.39573872799628
1461513.25567483395841.74432516604163
1471313.0081459995235-0.00814599952346191
1481613.14031740118932.85968259881071
1491413.50006819572750.499931804272526
15089.96228051921138-1.96228051921138
1511613.6653748100332.334625189967
1521615.85062147635610.149378523643902
1531213.1210372765344-1.12103727653438
1541112.2076628194322-1.20766281943218
1551615.85062147635610.149378523643902
15699.96228051921138-0.962280519211384


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.328960213640120.657920427280240.67103978635988
130.4303470638208740.8606941276417470.569652936179126
140.3023216104071880.6046432208143760.697678389592812
150.1959678674323620.3919357348647230.804032132567639
160.1494334252789510.2988668505579020.85056657472105
170.1092645007945820.2185290015891630.890735499205418
180.1691359722501330.3382719445002660.830864027749867
190.2810948842953630.5621897685907250.718905115704637
200.2070689798688930.4141379597377860.792931020131107
210.2332176549398270.4664353098796550.766782345060173
220.1743689900102630.3487379800205260.825631009989737
230.1354481919428850.2708963838857690.864551808057116
240.09517415771980610.1903483154396120.904825842280194
250.0706328759326010.1412657518652020.929367124067399
260.05663832303833210.1132766460766640.943361676961668
270.08060006833128810.1612001366625760.919399931668712
280.1484113501543350.2968227003086690.851588649845665
290.1170353441387380.2340706882774760.882964655861262
300.09033848784490660.1806769756898130.909661512155093
310.0660563174374780.1321126348749560.933943682562522
320.05830227710880720.1166045542176140.941697722891193
330.04158941579542000.08317883159083990.95841058420458
340.02952780879995960.05905561759991930.97047219120004
350.2057118119572730.4114236239145460.794288188042727
360.4078032238019480.8156064476038960.592196776198052
370.5480086021114760.9039827957770480.451991397888524
380.4940788253522440.9881576507044870.505921174647756
390.472520394253180.945040788506360.52747960574682
400.4375723395969230.8751446791938450.562427660403077
410.6820819594136210.6358360811727580.317918040586379
420.8432289267285270.3135421465429460.156771073271473
430.808749986429890.382500027140220.19125001357011
440.8490509932128150.3018980135743700.150949006787185
450.8234110469662970.3531779060674070.176588953033703
460.8185392030259990.3629215939480030.181460796974001
470.7946051243877060.4107897512245890.205394875612294
480.814534969384870.3709300612302590.185465030615130
490.7778925525447470.4442148949105060.222107447455253
500.794352088970370.4112958220592620.205647911029631
510.7710994001303830.4578011997392340.228900599869617
520.7465866794731860.5068266410536290.253413320526814
530.8473743062810030.3052513874379940.152625693718997
540.8154388373148180.3691223253703630.184561162685182
550.8094239533934340.3811520932131320.190576046606566
560.7775457994684470.4449084010631070.222454200531553
570.7384643297304090.5230713405391830.261535670269591
580.698565819991840.602868360016320.30143418000816
590.6640602282647410.6718795434705170.335939771735259
600.6421139481288080.7157721037423840.357886051871192
610.5946043577092740.8107912845814520.405395642290726
620.5550845922505380.8898308154989240.444915407749462
630.5362868053157930.9274263893684140.463713194684207
640.5280908563007880.9438182873984240.471909143699212
650.5249815592454030.9500368815091930.475018440754597
660.5941084937900740.8117830124198520.405891506209926
670.5507884291532480.8984231416935050.449211570846752
680.5103850019154920.9792299961690150.489614998084508
690.6742015971347990.6515968057304020.325798402865201
700.8443840558701270.3112318882597470.155615944129873
710.8410373825999930.3179252348000130.158962617400007
720.8744500717612730.2510998564774540.125549928238727
730.9401926281461650.1196147437076710.0598073718538355
740.9251859073884530.1496281852230950.0748140926115474
750.9159796572937130.1680406854125740.0840203427062869
760.8965468309022560.2069063381954880.103453169097744
770.9188327822852140.1623344354295730.0811672177147863
780.9261189609462530.1477620781074940.0738810390537472
790.9686596212472930.06268075750541390.0313403787527070
800.9595705379758710.08085892404825750.0404294620241288
810.9552328355881760.08953432882364870.0447671644118243
820.9784496617803660.0431006764392680.021550338219634
830.97253840904550.05492318190899850.0274615909544992
840.9767180211431860.04656395771362890.0232819788568144
850.9693244863205330.06135102735893340.0306755136794667
860.9642217587916570.07155648241668590.0357782412083429
870.95503713941090.08992572117820060.0449628605891003
880.9464823308333960.1070353383332080.0535176691666038
890.9477420148104730.1045159703790540.0522579851895269
900.9335103713273460.1329792573453080.066489628672654
910.9362690899109770.1274618201780460.0637309100890231
920.9623011910802930.0753976178394130.0376988089197065
930.9974338576672130.005132284665573590.00256614233278679
940.9964679051802770.007064189639446010.00353209481972301
950.9956807678981370.00863846420372590.00431923210186295
960.9941455242723070.01170895145538510.00585447572769257
970.9945771718863530.01084565622729310.00542282811364655
980.9953054926155210.00938901476895750.00469450738447875
990.9935705544078930.01285889118421430.00642944559210713
1000.9922940118117680.01541197637646380.0077059881882319
1010.994872149467810.01025570106437880.00512785053218939
1020.9948555875539620.01028882489207690.00514441244603844
1030.99280636735310.01438726529379920.00719363264689962
1040.9945565194358150.01088696112836950.00544348056418477
1050.9921514523383040.01569709532339180.00784854766169588
1060.9896373405060160.0207253189879670.0103626594939835
1070.9886329687732230.02273406245355340.0113670312267767
1080.9927152253826540.01456954923469210.00728477461734604
1090.9991969107022760.001606178595447760.000803089297723881
1100.9988260788343820.002347842331235710.00117392116561786
1110.9997245414362350.0005509171275290050.000275458563764503
1120.9995339434412650.000932113117470120.00046605655873506
1130.999464130907320.001071738185361210.000535869092680606
1140.9991656673617230.001668665276553850.000834332638276923
1150.9988093878997370.002381224200524840.00119061210026242
1160.9980288046841330.003942390631733280.00197119531586664
1170.9968350424507360.00632991509852870.00316495754926435
1180.9993507148214280.001298570357144620.00064928517857231
1190.999017880693410.001964238613178570.000982119306589283
1200.9984030718152960.003193856369408620.00159692818470431
1210.998253954898380.003492090203240890.00174604510162044
1220.9978213098055260.004357380388948450.00217869019447422
1230.9966616580804760.006676683839048170.00333834191952409
1240.9968062889180210.006387422163957010.00319371108197851
1250.9946282967695860.01074340646082780.00537170323041389
1260.9918601951166450.01627960976670960.00813980488335478
1270.9891738028203030.02165239435939410.0108261971796970
1280.9843743609638830.03125127807223430.0156256390361172
1290.9914192077192560.01716158456148780.00858079228074389
1300.994100427792560.01179914441487910.00589957220743954
1310.9908593935831420.01828121283371570.00914060641685786
1320.9896223776353670.02075524472926690.0103776223646334
1330.9844495459632090.03110090807358260.0155504540367913
1340.9739636847511020.05207263049779590.0260363152488980
1350.955848147072390.08830370585521930.0441518529276097
1360.9485444675799750.1029110648400490.0514555324200246
1370.9309984346026840.1380031307946320.0690015653973161
1380.9012262680931570.1975474638136860.0987737319068429
1390.8745395189082230.2509209621835530.125460481091777
1400.8052381702466710.3895236595066570.194761829753329
1410.8317367411584260.3365265176831470.168263258841574
1420.7333282092840370.5333435814319260.266671790715963
1430.61468671601090.7706265679782010.385313283989100
1440.6853728434464490.6292543131071010.314627156553551


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level200.150375939849624NOK
5% type I error level430.323308270676692NOK
10% type I error level550.413533834586466NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293205977dv8gbk52zhvcrzd/10gar21293206094.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293205977dv8gbk52zhvcrzd/10gar21293206094.ps (open in new window)


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


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


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


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


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


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


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


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


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