Home » date » 2010 » Dec » 25 »

Multiple Regression

*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: Sat, 25 Dec 2010 09:35:42 +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/25/t12932696388y20fc6c0e98r8x.htm/, Retrieved Sat, 25 Dec 2010 10:34:00 +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/25/t12932696388y20fc6c0e98r8x.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 «
13 13 14 13 3 12 12 8 13 5 15 10 12 16 6 12 9 7 12 6 10 10 10 11 5 12 12 7 12 3 15 13 16 18 8 9 12 11 11 4 12 12 14 14 4 11 6 6 9 4 11 5 16 14 6 11 12 11 12 6 15 11 16 11 5 7 14 12 12 4 11 14 7 13 6 11 12 13 11 4 10 12 11 12 6 14 11 15 16 6 10 11 7 9 4 6 7 9 11 4 11 9 7 13 2 15 11 14 15 7 11 11 15 10 5 12 12 7 11 4 14 12 15 13 6 15 11 17 16 6 9 11 15 15 7 13 8 14 14 5 13 9 14 14 6 16 12 8 14 4 13 10 8 8 4 12 10 14 13 7 14 12 14 15 7 11 8 8 13 4 9 12 11 11 4 16 11 16 15 6 12 12 10 15 6 10 7 8 9 5 13 11 14 13 6 16 11 16 16 7 14 12 13 13 6 15 9 5 11 3 5 15 8 12 3 8 11 10 12 4 11 11 8 12 6 16 11 13 14 7 17 11 15 14 5 9 15 6 8 4 9 11 12 13 5 13 12 16 16 6 10 12 5 13 6 6 9 15 11 6 12 12 12 14 5 8 12 8 13 4 14 13 13 13 5 12 11 14 13 5 11 9 12 12 4 16 9 16 16 6 8 11 10 15 2 15 11 15 15 8 7 12 8 12 3 16 12 16 14 6 14 9 19 12 6 16 11 14 15 6 9 9 6 12 5 14 12 13 13 5 11 12 15 12 6 13 12 7 12 5 15 12 13 13 6 5 14 4 5 2 15 11 14 13 5 13 12 13 13 5 11 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 time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Knowingpeople[t] = + 0.704773125332253 + 0.388112646909159Popularity[t] -0.072086130850391Findingfriends[t] + 0.267672517283153Liked[t] + 0.6695223593835Celebrity[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.7047731253322531.7973720.39210.6955280.347764
Popularity0.3881126469091590.0976943.97270.000115.5e-05
Findingfriends-0.0720861308503910.121313-0.59420.5532570.276628
Liked0.2676725172831530.1250022.14130.0338510.016926
Celebrity0.66952235938350.1998273.35050.0010190.00051


Multiple Linear Regression - Regression Statistics
Multiple R0.652918056368862
R-squared0.426301988332492
Adjusted R-squared0.411104690010174
F-TEST (value)28.0511693125378
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.65644680094332
Sum Squared Residuals1065.56315054255


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11410.30142763692773.69857236307227
2811.324445839636-3.32444583963596
31214.1054959532972-2.10549595329718
4711.9425540742875-4.94255407428749
51010.1570477729521-0.157047772952123
679.71772860358581-2.71772860358581
71615.76362731407930.236372685920685
8118.955240504958682.04475949504132
91410.92259599753563.07740400246438
1069.62863754931304-3.62863754931304
111612.37813098534623.62186901465381
121111.3381830348271-0.33818303482715
131612.02552487664753.97447512335247
14128.302515466722733.69748453327727
15711.4616832904095-4.46168329040952
16139.7314657987773.268534201223
171110.9500703879180.049929612082009
181513.64529717553761.35470282446237
1978.88009424815192-1.88009424815192
2098.151333218483160.848666781516844
2179.14402450712748-2.14402450712748
221414.4352596645471-0.435259664547138
231510.20540177172774.79459822827226
24710.1195784456862-3.11957844568616
251512.77019349283782.22980650716222
261714.03340982244682.96659017755321
271512.10658378309222.89341621690782
281412.26857552722981.73142447277016
291412.86601175576291.13398824423705
30812.4750465851723-4.47504658517226
3189.84884580244664-1.84884580244664
321412.80766282010371.19233717989626
331413.97506088678760.0249391132124124
34810.5551553567449-2.55515535674487
35118.955240504958682.04475949504132
361614.15384995207281.8461500479272
371012.5293132335858-2.52931323358577
3889.83796113093699-1.83796113093699
391412.4541669767791.54583302322099
401615.09104482873950.90895517126055
411312.77019349283780.229806507162218
42510.8306524195813-5.83065241958131
4386.784681682670521.21531831732948
44108.906886506183061.09311349381694
45811.4102691656775-3.41026916567754
461314.5556997941731-1.55569979417314
471513.60476772231531.3952322776847
4867.93596456055805-1.93596456055805
491210.23219402975891.76780597024112
501613.18509839777812.81490160222192
51511.2177429052011-6.21774290520115
52159.346205675549375.65379432445063
531211.59211835691910.407881643080883
5489.10247289261583-1.10247289261583
551312.02858500260390.97141499739611
561411.39653197048642.60346802951365
571210.21539670861131.78460329138868
581614.56569473105671.43430526894327
59108.370859339265531.62914066073448
601515.1047820239306-0.104782023930638
6187.777165369040010.222834630959986
621613.81409130393932.18590869606075
631912.71877936810586.2812206318942
641414.1538499520728-0.153849952072798
65610.1086937741765-4.10869377417651
661312.10067113345430.899328866545718
671511.33818303482713.66181696517285
68711.444885969262-4.44488596926197
691313.1583061397469-0.158306139746941
7044.31353783315534-0.313537833155342
711412.56086991121381.43913008878617
721311.71255848654511.28744151345488
731111.2760918408603-0.276091840860348
741413.10906240634530.890937593654738
751212.1381404607202-0.138140460720245
761511.99396819901953.00603180098054
771410.98468719150243.01531280849758
781311.61279036303751.38720963696247
79811.6988212913539-3.69882129135394
8066.4518578454642-0.451857845464202
8178.44668772842351-1.44668772842351
821312.9350377606570.0649622393430256
831313.6452971755376-0.645297175537633
841110.42472029023530.575279709764726
85510.105841250495-5.10584125049497
861211.65420955088590.345790449114081
8788.75965411852592-0.759654118525917
881112.2202215284542-1.22022152845422
891415.4928946708398-1.4928946708398
9099.68311180000138-0.683111800001383
911013.6452971755376-3.64529717553763
921311.82517407061781.17482592938216
931615.01895869788910.98104130211094
941613.30247840144772.69752159855228
951111.1288594532032-0.128859453203201
9689.34335315186784-1.34335315186784
97410.8019482656348-6.80194826563478
9877.55784685053248-0.557846850532477
991411.76002275069472.23997724930533
1001112.3820808459286-1.38208084592862
1011715.09104482873951.90895517126055
1021514.75128618060590.248713819394094
1031713.96438381755283.03561618244723
10459.7414607356606-4.74146073566059
10545.55213229606351-1.55213229606351
1061014.8401696326038-4.84016963260385
107118.965235441842272.03476455815773
1081514.71666937702150.283330622978522
109108.844795312216261.15520468778374
11099.9982485814341-0.998248581434088
1111211.34817797171070.651822028289261
1121512.95183508180452.04816491819547
113711.6058555521103-4.6058555521103
1141313.3055385274041-0.305538527404088
1151214.6308460509799-2.6308460509799
1161413.88617743478960.113822565210355
1171413.81409130393930.185908696060746
118812.4088731039598-4.40887310395976
1191513.03786601012091.96213398987907
1201211.2355623876380.76443761236198
1211210.65492348025251.34507651974754
1221611.90508474702154.09491525297848
12398.906886506183060.0931134938169358
1241512.57766723236142.42233276763862
1251513.81409130393931.18590869606075
126611.5921183569191-5.59211835691912
1271415.6884810572726-1.68848105727256
1281511.99396819901953.00603180098054
1291011.4923502334115-1.49235023341152
13065.429314172832370.570685827167625
1311415.6884810572726-1.68848105727256
1321213.2303922705973-1.23039227059733
133810.6817157382836-2.6817157382836
1341112.8453397496445-1.84533974964454
1351313.4259786570301-0.425978657030094
136910.6549234802525-1.65492348025246
1371513.10995214097131.89004785902867
138137.777165369040015.22283463095999
1391515.2461017619499-0.246101761949885
1401411.73629061861992.2637093813801
1411610.72700961110295.27299038889714
1421412.64975336321181.35024663678822
1431412.62227897282941.3777210271706
144107.372937533334542.62706246666546
1451010.6549234802525-0.654923480252464
146411.1456567743508-7.14565677435075
147810.0396677692825-2.03966776928248
1481511.53682954721633.46317045278372
1491613.49806478788052.50193521211951
1501215.4208085399894-3.42080853998941
1511213.1236893361625-1.12368933616251
1521515.0189586978891-0.0189586978890594
15399.29499915309222-0.294999153092224
1541213.4497107891049-1.44971078910487
1551412.5746071064051.42539289359498
156119.655637409619011.34436259038099


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.7145996386527610.5708007226944780.285400361347239
90.5680701472478390.8638597055043220.431929852752161
100.5097718062748350.980456387450330.490228193725165
110.3850670446601130.7701340893202270.614932955339887
120.3666322931279430.7332645862558870.633367706872057
130.9416475899962980.1167048200074030.0583524100037016
140.9282163373278010.1435673253443980.071783662672199
150.949415775116110.1011684497677790.0505842248838893
160.950821383184350.09835723363129820.0491786168156491
170.9288216903169990.1423566193660020.0711783096830009
180.9011254529546430.1977490940907140.0988745470453571
190.8712714740373790.2574570519252420.128728525962621
200.828873792791710.3422524144165790.171126207208289
210.8735288378056180.2529423243887650.126471162194382
220.8328317616667210.3343364766665590.167168238333279
230.9114286570029010.1771426859941970.0885713429970986
240.9173297894243210.1653404211513580.0826702105756792
250.9095973542853690.1808052914292620.0904026457146308
260.9068302964757660.1863394070484690.0931697035242343
270.894257865407480.2114842691850390.105742134592519
280.8727122182771760.2545755634456490.127287781722824
290.8411916619543420.3176166760913150.158808338045657
300.8847822509605740.2304354980788520.115217749039426
310.8583004756682520.2833990486634970.141699524331748
320.8264258131464990.3471483737070020.173574186853501
330.7870371217066290.4259257565867420.212962878293371
340.785416935840630.4291661283187410.214583064159371
350.7567581996542670.4864836006914650.243241800345733
360.7364980491201930.5270039017596140.263501950879807
370.7529203801921860.4941592396156280.247079619807814
380.7221204848095050.5557590303809890.277879515190495
390.6883910515278890.6232178969442220.311608948472111
400.6425733981098620.7148532037802760.357426601890138
410.5907035369457590.8185929261084820.409296463054241
420.7103654207248960.5792691585502070.289634579275104
430.6764340812426570.6471318375146870.323565918757343
440.6315698100875950.7368603798248090.368430189912405
450.6749657995754640.6500684008490720.325034200424536
460.6395101285828250.720979742834350.360489871417175
470.6211913139471510.7576173721056980.378808686052849
480.591331501464130.817336997071740.40866849853587
490.5557561408850350.888487718229930.444243859114965
500.5468435792652520.9063128414694960.453156420734748
510.7749048053930790.4501903892138420.225095194606921
520.8735641797638130.2528716404723730.126435820236187
530.8465615444714570.3068769110570860.153438455528543
540.8288640220093310.3422719559813390.171135977990669
550.8028806277678090.3942387444643830.197119372232191
560.7996752257061460.4006495485877080.200324774293854
570.7787694283266840.4424611433466320.221230571673316
580.7487020117560430.5025959764879130.251297988243957
590.7199062034788830.5601875930422340.280093796521117
600.6790695801741370.6418608396517260.320930419825863
610.6381895024680160.7236209950639690.361810497531984
620.6264399370657080.7471201258685840.373560062934292
630.8089525707395750.3820948585208490.191047429260424
640.7752930586734340.4494138826531320.224706941326566
650.8272916599610930.3454166800778140.172708340038907
660.7986997444891240.4026005110217510.201300255510876
670.8281254424716720.3437491150566560.171874557528328
680.8784525652937730.2430948694124540.121547434706227
690.8533846666233380.2932306667533240.146615333376662
700.8284237851769550.3431524296460890.171576214823045
710.805572304037940.3888553919241190.19442769596206
720.7783559433976760.4432881132046480.221644056602324
730.7442457554037480.5115084891925030.255754244596252
740.7206475592472220.5587048815055550.279352440752778
750.6807793231458960.6384413537082080.319220676854104
760.69289006333740.6142198733252020.307109936662601
770.7017995760017440.5964008479965120.298200423998256
780.6710601757750120.6578796484499760.328939824224988
790.7243416415520760.5513167168958480.275658358447924
800.6850870963683060.6298258072633880.314912903631694
810.6563396876724240.6873206246551510.343660312327576
820.6122679114624830.7754641770750330.387732088537517
830.5719960113046380.8560079773907240.428003988695362
840.5289280996403760.9421438007192490.471071900359624
850.7053056425858960.5893887148282090.294694357414104
860.6643937613254590.6712124773490830.335606238674541
870.6264463355564790.7471073288870430.373553664443521
880.5899814571590060.8200370856819890.410018542840994
890.5608440933499590.8783118133000830.439155906650041
900.5186984961315560.9626030077368880.481301503868444
910.5621024339427880.8757951321144240.437897566057212
920.5509301365529740.8981397268940520.449069863447026
930.5121004183706690.9757991632586610.487899581629331
940.5055428052191360.9889143895617280.494457194780864
950.4585091461353250.917018292270650.541490853864675
960.431276621687790.8625532433755790.56872337831221
970.6464459681073890.7071080637852230.353554031892611
980.6066586005044860.7866827989910270.393341399495514
990.6030198171387530.7939603657224950.396980182861247
1000.5699729015758050.860054196848390.430027098424195
1010.5559336180220220.8881327639559560.444066381977978
1020.5082389870281970.9835220259436060.491761012971803
1030.5698759275723110.8602481448553770.430124072427689
1040.741006313129750.51798737374050.25899368687025
1050.7333515659390.5332968681219990.266648434060999
1060.7823678452162740.4352643095674510.217632154783726
1070.7570148048662460.4859703902675080.242985195133754
1080.7380218615923090.5239562768153820.261978138407691
1090.7006052600213530.5987894799572940.299394739978647
1100.6558852817981860.6882294364036280.344114718201814
1110.612525693994440.774948612011120.38747430600556
1120.6522522313156710.6954955373686590.347747768684329
1130.7298049222349370.5403901555301250.270195077765063
1140.683556246656150.63288750668770.31644375334385
1150.6580925587156080.6838148825687830.341907441284392
1160.6066104190759040.7867791618481920.393389580924096
1170.5545188402967460.890962319406510.445481159703254
1180.581190253963280.837619492073440.41880974603672
1190.5547849312370870.8904301375258250.445215068762913
1200.5139591236749590.9720817526500820.486040876325041
1210.4603710707946920.9207421415893840.539628929205308
1220.48198857772030.96397715544060.5180114222797
1230.4232889172502490.8465778345004980.576711082749751
1240.4163469969037570.8326939938075140.583653003096243
1250.3640991021673960.7281982043347920.635900897832604
1260.5856095645007660.8287808709984680.414390435499234
1270.5292860160177570.9414279679644860.470713983982243
1280.5635022245703790.8729955508592430.436497775429621
1290.5075581914273640.9848836171452730.492441808572636
1300.4535934823311420.9071869646622840.546406517668858
1310.394027869139210.788055738278420.60597213086079
1320.3493974628418790.6987949256837580.650602537158121
1330.3586031415474150.717206283094830.641396858452585
1340.3099869360355810.6199738720711620.690013063964419
1350.2499549534422990.4999099068845990.7500450465577
1360.2684968551574710.5369937103149420.731503144842529
1370.2365551371059230.4731102742118470.763444862894077
1380.2923272839671030.5846545679342070.707672716032897
1390.2556241376911290.5112482753822580.744375862308871
1400.2528684215175830.5057368430351650.747131578482417
1410.367471301609860.7349426032197190.63252869839014
1420.3134351797151160.6268703594302320.686564820284884
1430.2325764422250330.4651528844500660.767423557774967
1440.2116081899614620.4232163799229230.788391810038538
1450.164563359416780.3291267188335610.83543664058322
1460.7731206690361120.4537586619277770.226879330963888
1470.6598779665461340.6802440669077320.340122033453866
1480.7149845033866550.570030993226690.285015496613345


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level10.00709219858156028OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/102tlm1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/102tlm1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/1waoa1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/1waoa1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/2waoa1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/2waoa1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/3o1ne1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/3o1ne1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/4o1ne1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/4o1ne1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/5o1ne1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/5o1ne1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/6zb4g1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/6zb4g1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/7zb4g1293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/7zb4g1293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/8ak411293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/8ak411293269732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/9ak411293269732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932696388y20fc6c0e98r8x/9ak411293269732.ps (open in new window)


 
Parameters (Session):
par1 = 3 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 3 ; 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