Home » date » 2010 » Dec » 03 »

workshop 4

*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, 03 Dec 2010 14:34:34 +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/03/t1291386781g65yxvvkskwuc7n.htm/, Retrieved Fri, 03 Dec 2010 15:33:11 +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/03/t1291386781g65yxvvkskwuc7n.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 «
5 6 5 7 11 2 6 2 3 11 6 6 6 5 15 6 4 4 5 9 6 2 6 3 11 5 7 3 4 17 5 6 5 4 16 6 5 3 5 9 6 6 5 5 14 5 7 4 5 12 5 7 1 6 6 5 4 6 5 4 6 1 6 2 13 5 6 6 5 12 5 4 4 4 10 6 5 6 6 14 6 5 5 5 12 4 6 3 6 9 5 4 5 5 16 5 6 4 2 13 5 3 5 3 12 6 3 6 5 11 5 5 3 6 12 7 5 4 5 12 6 5 5 4 11 6 5 4 5 16 6 5 5 5 9 6 2 6 5 8 4 6 7 5 11 5 7 2 6 9 6 2 4 6 16 4 3 6 6 14 5 6 5 6 10 5 5 5 4 14 5 7 5 4 13 7 5 6 3 12 7 6 6 5 16 6 5 1 6 16 7 3 4 4 15 6 7 2 6 5 5 5 3 3 12 6 5 4 2 11 4 6 5 5 15 6 2 4 5 15 5 3 3 6 10 6 6 4 4 12 6 7 6 3 5 5 5 4 3 16 6 4 5 4 16 5 6 4 5 12 5 7 5 4 6 5 2 6 3 7 6 2 6 4 14 6 2 4 4 8 5 5 4 4 12 7 2 6 3 10 6 5 4 6 11 5 6 2 5 17 5 2 6 5 13 6 4 5 6 15 5 6 6 6 10 5 4 6 4 9 6 3 5 5 16 6 3 5 4 11 3 3 5 6 8 5 6 5 5 14 5 6 3 5 11 6 5 4 5 12 5 3 1 5 14 5 3 5 2 15 4 2 2 5 14 5 3 6 5 11 5 3 5 5 11 2 5 2 2 15 6 3 6 6 7 6 5 5 4 12 6 2 6 4 10 6 5 3 6 13 5 6 4 6 15 5 6 4 4 13 6 5 4 2 15 5 2 4 4 8 5 6 5 5 14 6 7 2 7 11 3 5 3 7 12 6 5 5 5 16 3 2 6 5 8 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
populariteit[t] = + 12.9387027347946 + 0.195517891544743handgebruik[t] + 0.0494195249964288ontmoeting[t] -0.163771214544565extravert[t] -0.316901171073527blozen[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.93870273479461.7538197.377400
handgebruik0.1955178915447430.2254750.86710.3872430.193621
ontmoeting0.04941952499642880.1562310.31630.7521940.376097
extravert-0.1637712145445650.179181-0.9140.3621750.181087
blozen-0.3169011710735270.200636-1.57950.1163180.058159


Multiple Linear Regression - Regression Statistics
Multiple R0.152437878229750
R-squared0.023237306719188
Adjusted R-squared-0.00263720171209170
F-TEST (value)0.898077224574297
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0.466771085548897
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.96929238748901
Sum Squared Residuals1331.32128964243


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11111.1756450722595-0.175645072259478
21112.3480097255529-1.34800972555294
31511.84119409140663.15880590859341
4912.0698974705029-3.06989747050287
51112.2773183335679-1.27731833356793
61712.50331053956554.4966894604345
71612.12634858547993.87365141452006
8912.2830882100439-3.28308821004386
91412.00496530595121.99503469404884
101212.0226381539474-0.0226381539474106
11612.1970506265076-6.19705062650758
12411.546837149869-7.546837149869
131312.54479997964500.455200020354968
141211.64567619986190.354323800138148
151012.1912807500317-2.19128075003165
161411.47487339533662.52512660466336
171211.95554578095470.0444542190452687
18911.6245707808773-2.62457078087728
191611.71060836441364.28939163558644
201312.92392214217160.0760778578284378
211212.2949911815642-0.294991181564185
221111.6929355164173-0.69293551641731
231211.77066914742560.229330852574408
241212.3148348870440-0.314834887044039
251112.2724469520283-1.27244695202826
261612.11931699549933.8806830045007
27911.9555457809547-2.95554578095473
28811.6435159914209-3.64351599142088
291111.2863870937725-0.286387093772544
30912.0332794119630-3.03327941196301
311611.65415724943654.34584275056352
321410.98499856225433.01500143774570
331011.4925462433329-1.49254624333289
341412.07692906048351.92307093951648
351312.17576811047640.824231889523628
361212.6210948001020-0.621094800101963
371612.03671198295133.96328801704866
381612.29372946805953.70627053194053
391512.53289700812472.46710299187529
40512.2287973035078-7.22879730350776
411212.7213726606462-0.721372660646172
421113.0700205087199-2.07002050871988
431511.61392952286173.38607047713833
441511.971058420513.02894157948999
451011.6718300974327-1.67183009743273
461212.4856376915693-0.485637691569252
47512.5244159585501-7.52441595855008
481612.55760144610163.44239855389839
491612.22302742703183.77697257296817
501211.97321862895100.0267813710490179
51612.1757681104764-6.17576811047637
52712.0818004420232-5.08180044202319
531411.96041716249442.03958283750559
54812.2879595915835-4.28795959158354
551212.2407002750281-0.240700275028080
561012.4728362251127-2.47283622511268
571111.8024158244258-0.80241582442577
581712.30076105804014.69923894195989
591311.44799809987611.55200190012386
601511.58922508488483.41077491511522
611011.3287750287883-1.32877502878833
62911.8637383209425-2.86373832094252
631611.85670673096194.14329326903813
641112.1736079020354-1.1736079020354
65810.9532518852541-2.95325188525412
661411.80944741440642.19055258559358
671112.1369898434955-1.13698984349555
681212.1193169954993-0.119316995499296
691412.31627369759541.68372630240461
701512.61189235263772.38810764736229
711411.90756506650972.09243493349034
721111.4974176248726-0.497417624872566
731111.6611888394171-0.661188839417131
741512.61549137163002.38450862836996
75711.3760343453438-4.37603434534378
761212.2724469520283-0.272446952028258
771011.9604171624944-1.96041716249441
781311.96618703897031.03381296102967
791511.65631745787753.34368254212254
801312.29011980002450.709880199975491
811513.07002050871991.92997949128012
82812.0924417000388-4.09244170003879
831411.80944741440642.19055258559358
841111.9118961324342-0.91189613243423
851211.06273219326260.937267806737421
861611.95554578095474.04445421904527
87811.0569623167867-3.05696231678665
881211.76002788941000.239972110590012
891611.96257737093544.03742262906462
901111.9661870389703-0.966187038970335
911311.92379910395461.07620089604545
92612.3867986415764-6.3867986415764
93411.9661870389703-7.96618703897033
941112.3867986415764-1.38679864157639
95712.1418612250352-5.14186122503522
961211.86030574995420.139694250045802
971212.2031837215520-0.203183721551975
981612.33034752659933.66965247340068
991511.90612625595833.09387374404170
1001311.85670673096191.14329326903813
1011211.44312671833650.556873281663538
102911.5645099978652-2.56450999786525
1031612.28795959158353.71204040841646
1041112.4468594245884-1.44685942458843
1051411.80728720596542.19271279403455
1061012.1369898434955-2.13698984349555
1071011.6435159914209-1.64351599142088
1081111.9109976374980-0.910997637497979
1091613.14558328224462.85441671775544
110811.4797447768763-3.47974477687631
1111612.29499118156423.70500881843581
1121211.59625667486540.403743325134577
1131111.1558013667795-0.155801366779509
1141611.03441808725074.96558191274928
115912.3325077350403-3.33250773504029
1161311.76489927094971.23510072905034
1171411.40994123078492.59005876921507
1181012.2031837215520-2.20318372155198
1191212.9062492941753-0.906249294175312
1201111.7825721189459-0.782572118945915
1211010.9532518852541-0.953251885254119
1221211.95554578095470.0444542190452687
1231312.24070027502810.75929972497192
1241412.26541536204761.73458463795239
1251211.69293551641730.307064483582691
1261411.64351599142092.35648400857912
1271312.29011980002450.709880199975491
128812.2349303985522-4.23493039855215
1291311.23353499778781.76646500221221
1301011.9732186289510-1.97321862895098
131912.0289483460384-3.02894834603844
132812.1193169954993-4.1193169954993
1331511.97321862895103.02678137104902
1341512.08757031849912.91242968150088
1351212.1525024830508-0.152502483050827
136810.9554120936951-2.95541209369509
1371512.71073140263062.28926859736943
138912.1912807500317-3.19128075003165
1391411.15797222426312.84202777573689
1401612.49050907310893.50949092689107
1411413.21755768581950.782442314180456
1421411.760027889412.23997211059001
1431412.39383023155701.60616976844296
1441411.80728720596542.19271279403455
1451411.53980555988832.46019444011165
1461312.44108954811250.558910451887501
1471212.1687365204957-0.168736520495725
1481311.67742287686201.32257712313797
1491912.63660743965726.36339256034276
150812.3267378585644-4.32673785856436
1511012.2336686850474-2.23366868504743
152711.6880641348776-4.68806413487763
1531211.83903388296560.160966117034377
1541611.41497906032864.58502093967139
1551512.27731833356792.72268166643207
156911.7755405289653-2.77554052896527


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.093762116546650.18752423309330.90623788345335
90.039773569615470.079547139230940.96022643038453
100.07517033045666760.1503406609133350.924829669543332
110.0634080004266550.126816000853310.936591999573345
120.4348220091691510.8696440183383020.565177990830849
130.3783178085606530.7566356171213060.621682191439347
140.3053151909847520.6106303819695030.694684809015248
150.2264274023576630.4528548047153270.773572597642337
160.3080200761263720.6160401522527440.691979923873628
170.2312111387898520.4624222775797030.768788861210148
180.2096768687826320.4193537375652640.790323131217368
190.5555143063661450.888971387267710.444485693633855
200.5675811727919940.8648376544160120.432418827208006
210.4932746951900340.9865493903800680.506725304809966
220.4198357032978950.839671406595790.580164296702105
230.444550796526760.889101593053520.55544920347324
240.3744607631594490.7489215263188970.625539236840551
250.3435582605477160.6871165210954330.656441739452284
260.436121117893690.872242235787380.56387888210631
270.4488808450490460.8977616900980920.551119154950954
280.4157920269863860.8315840539727730.584207973013614
290.3779003160058790.7558006320117580.622099683994121
300.3432921424105950.686584284821190.656707857589405
310.6235956444208570.7528087111582860.376404355579143
320.6509425742642990.6981148514714030.349057425735701
330.6091846176761060.7816307646477880.390815382323894
340.5722420719547050.855515856090590.427757928045295
350.5151231259320450.969753748135910.484876874067955
360.4712132493800180.9424264987600360.528786750619982
370.4796958738490380.9593917476980770.520304126150962
380.5704278054967550.8591443890064910.429572194503245
390.5466690521218230.9066618957563540.453330947878177
400.754946447705960.4901071045880820.245053552294041
410.7115703376835430.5768593246329140.288429662316457
420.687104348324910.625791303350180.31289565167509
430.6994754957276260.6010490085447480.300524504272374
440.703215755969190.5935684880616190.296784244030809
450.6659343878587750.6681312242824510.334065612141225
460.6180906855890810.7638186288218390.381909314410919
470.8352749346321270.3294501307357470.164725065367873
480.849062906053090.3018741878938190.150937093946909
490.8604759979112120.2790480041775760.139524002088788
500.8310695079688710.3378609840622570.168930492031129
510.9060340024083460.1879319951833070.0939659975916537
520.9427741029314830.1144517941370340.0572258970685172
530.9330201648806350.1339596702387300.0669798351193652
540.9476302344403230.1047395311193530.0523697655596767
550.9337049232110490.1325901535779020.0662950767889511
560.929101616503370.1417967669932590.0708983834966297
570.9127116804923950.1745766390152100.0872883195076049
580.9397482801892560.1205034396214870.0602517198107435
590.9281150743687050.1437698512625900.0718849256312951
600.9304977817857320.1390044364285370.0695022182142684
610.9176511629030120.1646976741939770.0823488370969885
620.9159183819218330.1681632361563330.0840816180781666
630.9296728693358050.1406542613283910.0703271306641953
640.9151969008010560.1696061983978880.0848030991989441
650.9129739328612620.1740521342774750.0870260671387377
660.9037099692904150.1925800614191690.0962900307095847
670.8855458394353120.2289083211293750.114454160564688
680.8611895431115710.2776209137768580.138810456888429
690.844202783433710.3115944331325790.155797216566289
700.8361537167797950.3276925664404090.163846283220205
710.8237203851970050.352559229605990.176279614802995
720.7927078091893810.4145843816212380.207292190810619
730.7593619497933310.4812761004133380.240638050206669
740.7488759496200520.5022481007598950.251124050379948
750.7885808882796440.4228382234407120.211419111720356
760.7542391539053190.4915216921893620.245760846094681
770.7326531679340470.5346936641319060.267346832065953
780.6972029234397530.6055941531204940.302797076560247
790.7051914681877330.5896170636245330.294808531812267
800.6655974539296880.6688050921406240.334402546070312
810.637561647489230.7248767050215390.362438352510769
820.6726815984878950.654636803024210.327318401512105
830.6507493993770840.6985012012458310.349250600622916
840.6105944460906340.7788111078187310.389405553909366
850.5700997452439080.8598005095121850.429900254756092
860.6042951365123490.7914097269753020.395704863487651
870.6048121247754970.7903757504490070.395187875224503
880.5587679505912790.8824640988174430.441232049408721
890.5933383270495340.8133233459009320.406661672950466
900.550753845607760.8984923087844790.449246154392240
910.5095655213463040.9808689573073920.490434478653696
920.669907006685310.6601859866293790.330092993314690
930.8865709717061980.2268580565876030.113429028293802
940.869264303361490.2614713932770190.130735696638509
950.919160871812360.1616782563752800.0808391281876398
960.8993240806475490.2013518387049020.100675919352451
970.8758999538859880.2482000922280250.124100046114012
980.8835232728777150.2329534542445710.116476727122285
990.8832957767342850.2334084465314300.116704223265715
1000.8602585670576460.2794828658847080.139741432942354
1010.8311594167377670.3376811665244660.168840583262233
1020.826060318559840.347879362880320.17393968144016
1030.8419485379743650.3161029240512690.158051462025635
1040.820368629645780.3592627407084390.179631370354219
1050.8043651148563240.3912697702873530.195634885143676
1060.7948891571995690.4102216856008620.205110842800431
1070.768249099064960.463501801870080.23175090093504
1080.7303844845416480.5392310309167050.269615515458352
1090.7224408082771240.5551183834457520.277559191722876
1100.7524689217018450.495062156596310.247531078298155
1110.775438746254080.4491225074918410.224561253745920
1120.7336006792176060.5327986415647890.266399320782394
1130.6882261877277370.6235476245445270.311773812272263
1140.756728397829450.4865432043411010.243271602170551
1150.7918857744734270.4162284510531470.208114225526573
1160.760714471705970.4785710565880620.239285528294031
1170.7414359004554880.5171281990890230.258564099544512
1180.7079693496649230.5840613006701540.292030650335077
1190.6658461391512050.668307721697590.334153860848795
1200.6138829652578630.7722340694842740.386117034742137
1210.5596857870410660.8806284259178690.440314212958934
1220.5023374282663890.9953251434672230.497662571733611
1230.4444320664788550.8888641329577090.555567933521145
1240.3940438992703720.7880877985407440.605956100729628
1250.3371068517035650.674213703407130.662893148296435
1260.3145068429613470.6290136859226940.685493157038653
1270.2620885613073380.5241771226146760.737911438692662
1280.3232316624766620.6464633249533240.676768337523338
1290.2857889389128700.5715778778257390.71421106108713
1300.2594105508015410.5188211016030810.74058944919846
1310.2780725783929220.5561451567858450.721927421607077
1320.3434915979152630.6869831958305260.656508402084737
1330.3231524906848060.6463049813696130.676847509315194
1340.3039150571474130.6078301142948260.696084942852587
1350.2457230448476350.491446089695270.754276955152365
1360.2947672663103330.5895345326206660.705232733689667
1370.2404221196700880.4808442393401770.759577880329912
1380.2896539356067370.5793078712134740.710346064393263
1390.2814098691100140.5628197382200280.718590130889986
1400.2552215452798720.5104430905597440.744778454720128
1410.1949147598297610.3898295196595210.80508524017024
1420.1523805283804660.3047610567609310.847619471619534
1430.1038134555951780.2076269111903570.896186544404822
1440.0746224499609490.1492448999218980.925377550039051
1450.08350101935338340.1670020387067670.916498980646617
1460.05085436789765380.1017087357953080.949145632102346
1470.02585647496928310.05171294993856630.974143525030717
1480.02570907380641440.05141814761282870.974290926193586


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 level30.0212765957446809OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/106jzk1291386863.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/106jzk1291386863.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/1zzhy1291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/1zzhy1291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/2zzhy1291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/2zzhy1291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/3zzhy1291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/3zzhy1291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/4a8yj1291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/4a8yj1291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/5a8yj1291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/5a8yj1291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/6a8yj1291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/6a8yj1291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/73hg41291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/73hg41291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/83hg41291386862.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/83hg41291386862.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/96jzk1291386863.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291386781g65yxvvkskwuc7n/96jzk1291386863.ps (open in new window)


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