Home » date » 2010 » Dec » 18 »

Paper 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, 18 Dec 2010 14:35:02 +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/18/t129268279267pija2gejfqtkp.htm/, Retrieved Sat, 18 Dec 2010 15:33:12 +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/18/t129268279267pija2gejfqtkp.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 «
41 25 15 9 3 38 25 15 9 4 37 19 14 9 4 42 18 10 8 4 40 23 18 15 3 43 25 14 9 4 40 23 11 11 4 45 30 17 6 5 45 32 21 10 4 44 25 7 11 4 42 26 18 16 4 32 25 13 11 5 32 25 13 11 5 41 35 18 7 4 38 20 12 10 4 38 21 9 9 4 24 23 11 15 3 46 17 11 6 5 42 27 16 12 4 46 25 12 10 4 43 18 14 14 5 38 22 13 9 4 39 23 17 14 4 40 25 13 14 3 37 19 13 9 2 41 20 12 8 4 46 26 12 10 4 26 16 12 9 3 37 22 9 9 3 39 25 17 9 4 44 29 18 11 5 38 22 12 10 2 38 32 12 8 0 38 23 9 14 4 33 18 13 10 3 43 26 11 14 4 41 14 13 15 2 49 20 6 8 4 45 25 11 10 5 31 21 18 13 3 30 21 18 13 3 38 23 15 10 4 39 24 11 11 4 40 21 14 10 4 36 17 12 16 2 49 29 8 6 5 41 25 11 11 4 18 16 10 12 2 42 25 17 14 3 41 25 16 9 5 43 21 13 11 4 46 23 15 8 3 41 25 16 8 5 39 25 7 11 4 42 24 16 16 4 35 21 13 12 5 36 22 15 14 3 48 14 12 8 4 41 20 12 10 4 47 21 24 14 3 41 22 15 10 3 31 19 8 5 5 36 28 18 12 4 46 25 17 9 4 44 21 15 8 4 43 27 11 16 2 40 19 12 13 5 40 20 14 8 3 46 17 11 14 3 39 22 10 8 4 44 26 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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
StudyForCareer[t] = + 32.5202067294365 + 0.174192543560943PersonalStandards[t] + 0.0466789923587195ParentalExpectations[t] -0.217373134461697Doubts[t] + 1.39806533965884LeaderPreference[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.52020672943653.25035810.005100
PersonalStandards0.1741925435609430.103831.67770.0956270.047814
ParentalExpectations0.04667899235871950.1279440.36480.7157790.357889
Doubts-0.2173731344616970.154972-1.40270.1629150.081457
LeaderPreference1.398065339658840.4822252.89920.004340.00217


Multiple Linear Regression - Regression Statistics
Multiple R0.367916033517428
R-squared0.135362207719197
Adjusted R-squared0.110833476023288
F-TEST (value)5.51851638304525
F-TEST (DF numerator)4
F-TEST (DF denominator)141
p-value0.000371345161075842
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.98212870492208
Sum Squared Residuals3499.84650696961


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14139.81304301266211.18695698733793
23841.2111083523209-3.21110835232092
33740.1192740985965-3.11927409859654
44239.97573872006242.02426127993759
54038.30045609584621.69954390415383
64341.16442935996221.8355706400378
74040.2412610268408-0.241261026840763
84544.2256137978870.774386202112998
94542.49315697693812.50684302306185
104440.40293014452783.59706985547223
114240.00372593172611.99627406827385
123242.0810694383389-10.0810694383389
133242.0810694383389-10.0810694383389
144143.5278170339299-2.52781703392991
153839.9827355229783-1.98273552297835
163840.2342642239248-2.23426422392483
172437.9737031493351-13.9737031493351
184641.68103677744244.31896322255758
194240.95405302841641.04594697158356
204640.85369824078315.14630175921693
214340.25628122238602.74371877761405
223840.5951727369207-2.59517273692065
233939.869215577608-0.86921557760799
244038.63281935563621.36718064436384
253737.2764644269201-0.276464426920151
264140.41748179190170.582518208098259
274641.0278907843444.97210921565599
282638.1052731435374-12.1052731435374
293739.0103914278269-2.01039142782694
303941.3044663370384-2.30446633703836
314443.01123457437630.988765425623704
323837.53498993078260.465010069217436
333836.91553095599771.08446904400228
343839.4957836387382-1.49578363873823
353338.2829640885563-5.28296408855634
364340.11171925413852.88828074586150
374135.10126290234535.89873709765475
384940.13740783774948.86259216225058
394542.20508458808322.79491541191682
403138.3868172776477-7.38681727764769
413038.3868172776477-8.38681727764768
423840.6453501307373-2.64535013073734
433940.4154535704017-1.41545357040171
444040.2502860512567-0.250286051256730
453635.35978840620770.640211593792333
464943.63131032309765.36868967690242
474140.58964611396270.41035388603735
481835.9617304157761-17.9617304157761
494238.81953532507103.18046467492896
504142.6558526843385-1.65585268433848
514339.98623392443633.01376607556369
524639.68203106000196.31796893999811
534142.8732258188002-1.87322581880017
543940.4029301445278-1.40293014452777
554239.56198285988682.43801714011318
563541.1669261296335-6.16692612963345
573638.2035997096708-2.20359970967077
584839.37232653053618.62767346946392
594139.98273552297831.01726447702165
604738.44951809733838.5504819026617
614139.07309224751761.92690775248244
623142.1067580219498-11.1067580219498
633641.2216035566948-5.22160355669482
644641.30446633703844.69553366296164
654440.73171131253883.26828868746116
664337.05503484945845.94496515054162
674040.5544889156912-0.55448891569115
684039.11277443696030.887225563039656
694637.14592102243128.85407897756882
703940.6725088943062-1.67250889430619
714441.63333119537042.36666880462962
723836.44665407851611.55334592148385
733939.7011913888681-0.7011913888681
744142.9575587791016-1.95755877910164
753938.67949834799490.320501652005117
764039.56051267992890.439487320071111
774440.25581267421473.74418732578527
784239.49984008173832.50015991826170
794642.65382446283843.34617553716156
804440.0273862938373.97261370616297
813740.5088115551191-3.50881155511914
823937.19360164657661.80639835342339
834038.28093586705631.71906413294369
844238.81953532507103.18046467492896
853738.9295568689834-1.92955686898343
863337.8422226485037-4.84222264850373
873539.9290597277037-4.9290597277037
884235.66205254251296.33794745748706
893635.87536923397460.124630766025435
904439.49578363873824.50421636126177
914539.76333416701665.23666583298338
924741.06351653078675.93648346921328
934041.0835948011187-1.08359480111870
944938.684023339166210.3159766608338
954844.11762047547463.88237952452535
962940.7136612637069-11.7136612637069
974541.63932636649963.3606736335004
982936.4536508814321-7.45365088143208
994140.3743012010010.625698798999012
1003437.0445396450845-3.04453964508448
1013836.07819072106231.92180927893771
1023737.8823733861177-0.882373386117737
1034844.04442445141013.95557554858987
1043940.9345327996266-1.93453279962657
1053440.4384722006495-6.43847220064954
1063536.4898346694169-1.48983466941690
1074140.06807011506650.931929884933467
1084339.32564753817743.67435246182264
1094138.45365823065932.54634176934068
1103936.04053675311952.95946324688046
1113640.9992618408172-4.99926184081723
1123241.5414433906109-9.54144339061087
1134639.97720890002036.02279109997965
1144240.89687883168381.10312116831618
1154236.26693491199725.7330650880028
1164539.35177971203295.64822028796711
1173940.7261846895808-1.72618468958084
1184541.0188657599283.98113424007196
1194842.37228032872825.62771967127181
1202838.2422802673268-10.2422802673268
1213537.5314915293246-2.53149152932460
1223838.9460472444866-0.946047244486552
1234238.35929861415523.64070138584483
1243638.1032449220374-2.1032449220374
1253740.7191878866649-3.71918788666491
1263839.0625970431437-1.06259704314366
1274340.74920331982872.25079668017132
1283534.65196498604790.348035013952111
1293639.7186833961579-3.71868339615793
1303336.2814865593712-3.28148655937117
1313938.15591908552530.844080914474662
1323241.1157221461035-9.11572214610345
1334539.19360899580385.80639100419615
1343539.7618639870587-4.76186398705869
1353837.70468244109880.295317558901173
1363637.3542691324769-1.35426913247690
1374238.06209255263673.93790744736332
1384139.42047570285271.57952429714727
1394738.77488455421248.22511544578764
1403538.5540130182927-3.55401301829269
1414337.6684986531145.33150134688599
1424040.1061926311805-0.106192631180502
1434640.67600729576425.32399270423585
1444441.63932636649962.3606736335004
1453538.674529766579-3.67452976657898
1462939.6016650493296-10.6016650493296


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.2111449885492410.4222899770984820.788855011450759
90.1112048972439540.2224097944879080.888795102756046
100.05028840496738510.1005768099347700.949711595032615
110.02126024821543770.04252049643087550.978739751784562
120.1922904137682240.3845808275364490.807709586231776
130.2312930432098330.4625860864196660.768706956790167
140.2552493126480830.5104986252961660.744750687351917
150.1806767294510070.3613534589020130.819323270548993
160.1282741696954080.2565483393908160.871725830304592
170.6798687957056630.6402624085886740.320131204294337
180.6633198131846050.673360373630790.336680186815395
190.6183371172388580.7633257655222840.381662882761142
200.6718814540630350.656237091873930.328118545936965
210.6712626709483370.6574746581033270.328737329051663
220.6210909354467780.7578181291064450.378909064553222
230.5504269003912330.8991461992175330.449573099608767
240.5119793707472050.976041258505590.488020629252795
250.4542366865717030.9084733731434050.545763313428297
260.3867155773158030.7734311546316060.613284422684197
270.4241365100398530.8482730200797050.575863489960147
280.696282358465490.607435283069020.30371764153451
290.6402317772106230.7195364455787530.359768222789377
300.5910740629812630.8178518740374740.408925937018737
310.5306524958596160.9386950082807670.469347504140384
320.4788513269189520.9577026538379040.521148673081048
330.4213912855308510.8427825710617020.578608714469149
340.3655716744876050.731143348975210.634428325512395
350.3453910420769740.6907820841539470.654608957923026
360.3220250438915420.6440500877830830.677974956108458
370.3957358793509520.7914717587019040.604264120649048
380.5359989504733740.9280020990532520.464001049526626
390.4964117652291130.9928235304582260.503588234770887
400.5241102183034160.9517795633931680.475889781696584
410.5701779330691570.8596441338616850.429822066930843
420.5246414181502030.9507171636995940.475358581849797
430.4749801590352530.9499603180705050.525019840964747
440.4233203964913310.8466407929826620.576679603508669
450.3822757313247780.7645514626495550.617724268675222
460.3667173545017700.7334347090035390.63328264549823
470.3178383826654560.6356767653309130.682161617334544
480.8121437767364320.3757124465271370.187856223263568
490.803774583428740.3924508331425190.196225416571259
500.7695032490215330.4609935019569350.230496750978467
510.7519379981118250.496124003776350.248062001888175
520.7903110691466640.4193778617066720.209688930853336
530.757040530865720.4859189382685610.242959469134280
540.7228542743903790.5542914512192420.277145725609621
550.6964715505911640.6070568988176730.303528449408836
560.712904176653010.5741916466939810.287095823346990
570.6775694776598640.6448610446802710.322430522340136
580.7848813820961430.4302372358077140.215118617903857
590.7496402849691280.5007194300617440.250359715030872
600.8280249372656290.3439501254687420.171975062734371
610.8005034111480020.3989931777039960.199496588851998
620.9028228379060150.194354324187970.097177162093985
630.90525990872670.1894801825466010.0947400912733006
640.9016224462063850.1967551075872300.0983775537936151
650.8886483306867050.222703338626590.111351669313295
660.9020019904072190.1959960191855620.097998009592781
670.881248191994680.2375036160106410.118751808005321
680.856652595741080.2866948085178390.143347404258920
690.9090985929023110.1818028141953770.0909014070976885
700.8902654083065050.219469183386990.109734591693495
710.8714817599431710.2570364801136570.128518240056829
720.8477742821877950.3044514356244110.152225717812205
730.8203454772682220.3593090454635560.179654522731778
740.7925456268125850.4149087463748310.207454373187415
750.7564370446316280.4871259107367450.243562955368372
760.7173052009870590.5653895980258820.282694799012941
770.6969319898042920.6061360203914170.303068010195708
780.6624184901525150.6751630196949690.337581509847485
790.6372987294535130.7254025410929730.362701270546487
800.6200424462333090.7599151075333820.379957553766691
810.5950073138875850.809985372224830.404992686112415
820.5562245762528060.8875508474943880.443775423747194
830.5140424879649410.9719150240701180.485957512035059
840.4934568652599440.9869137305198880.506543134740056
850.4510546765326150.902109353065230.548945323467385
860.440874171043310.881748342086620.55912582895669
870.4538166299395310.9076332598790620.546183370060469
880.4765414477909190.9530828955818370.523458552209081
890.4274378351531160.8548756703062320.572562164846884
900.414348745400490.828697490800980.58565125459951
910.419112318154610.838224636309220.58088768184539
920.454039979326630.908079958653260.54596002067337
930.4054005252104630.8108010504209270.594599474789537
940.5764045767009690.8471908465980630.423595423299031
950.6032636839007060.7934726321985870.396736316099294
960.8221419425975870.3557161148048260.177858057402413
970.8021568157434450.3956863685131100.197843184256555
980.8299995079450190.3400009841099620.170000492054981
990.7943545734965950.411290853006810.205645426503405
1000.7755748397728550.4488503204542890.224425160227145
1010.7360711912931590.5278576174136820.263928808706841
1020.6930781955796750.6138436088406510.306921804420326
1030.6822941517397120.6354116965205770.317705848260288
1040.6399268775498220.7201462449003570.360073122450178
1050.6265975769625220.7468048460749550.373402423037478
1060.5865997360229910.8268005279540190.413400263977009
1070.533653139068410.932693721863180.46634686093159
1080.4965005026140010.9930010052280020.503499497385999
1090.4491877765083830.8983755530167670.550812223491617
1100.401446431038380.802892862076760.59855356896162
1110.3817626709629280.7635253419258560.618237329037072
1120.5675169015731530.8649661968536940.432483098426847
1130.5853565470771230.8292869058457540.414643452922877
1140.5260754090623850.947849181875230.473924590937615
1150.5315986950006360.9368026099987280.468401304999364
1160.5066090873034890.9867818253930210.493390912696511
1170.4505070504273870.9010141008547740.549492949572613
1180.4150765691485140.8301531382970290.584923430851486
1190.4307692055917510.8615384111835030.569230794408249
1200.6240334110384180.7519331779231640.375966588961582
1210.5699130202267750.860173959546450.430086979773225
1220.5003371978113270.9993256043773460.499662802188673
1230.4598863396101480.9197726792202960.540113660389852
1240.3988585396807720.7977170793615440.601141460319228
1250.3570681035122390.7141362070244790.64293189648776
1260.2977040665011270.5954081330022540.702295933498873
1270.2820994933452370.5641989866904740.717900506654763
1280.2193369785785680.4386739571571350.780663021421433
1290.1908351189704110.3816702379408220.809164881029589
1300.1854495692545180.3708991385090360.814550430745482
1310.1456995680273080.2913991360546150.854300431972692
1320.2948419847674510.5896839695349020.705158015232549
1330.2226589142175250.4453178284350500.777341085782475
1340.2166046879717250.433209375943450.783395312028275
1350.1514166742856760.3028333485713520.848583325714324
1360.1085668742847270.2171337485694550.891433125715273
1370.06138364616853750.1227672923370750.938616353831462
1380.03548486152535900.07096972305071810.964515138474641


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


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/10n5t1292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/10n5t1292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/2teme1292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/2teme1292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/3teme1292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/3teme1292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/4teme1292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/4teme1292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/5teme1292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/5teme1292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/6464z1292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/6464z1292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/7ff311292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/7ff311292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/8ff311292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/8ff311292682892.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/9762m1292682892.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t129268279267pija2gejfqtkp/9762m1292682892.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