Home » date » 2010 » Dec » 19 »

paper - multiple regression - leermogelijkheden

*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: Sun, 19 Dec 2010 10:19:28 +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/19/t1292753853a220imer49u1pb6.htm/, Retrieved Sun, 19 Dec 2010 11:17:33 +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/19/t1292753853a220imer49u1pb6.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 «
46 11 52 26 23 44 8 39 25 15 42 10 42 28 25 41 12 35 30 18 48 12 32 28 21 49 10 49 40 19 51 8 33 28 15 47 10 47 27 22 49 11 46 25 19 46 7 40 27 20 51 10 33 32 26 54 9 39 28 26 52 9 37 21 21 52 11 56 40 18 45 12 36 29 19 52 5 24 27 19 56 10 56 31 18 54 11 32 33 19 50 12 41 28 24 35 9 24 26 28 48 3 42 25 20 37 10 47 37 27 47 7 25 13 18 31 9 33 32 19 45 9 43 32 24 47 10 45 38 21 44 9 44 30 22 30 19 46 33 25 40 14 31 22 19 44 5 31 29 15 43 13 42 33 34 51 7 28 31 23 48 8 38 23 19 55 11 59 42 26 48 11 43 35 15 53 12 29 31 15 49 9 38 31 17 44 13 39 38 30 45 12 50 34 19 40 11 44 33 28 44 18 29 23 23 41 8 29 18 23 46 14 36 33 21 47 10 43 26 18 48 13 28 29 19 43 13 39 23 24 46 8 35 18 15 53 10 43 36 20 33 8 28 21 24 47 9 49 31 9 43 10 33 31 20 45 9 39 29 20 49 9 36 24 10 45 9 24 35 44 37 10 47 37 20 42 8 34 29 20 43 11 33 31 11 44 11 43 34 21 39 10 41 38 21 37 23 40 27 19 53 9 39 33 17 48 12 54 36 16 47 9 43 27 14 49 9 45 33 19 47 8 29 24 21 56 9 45 31 16 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Leermogelijkheden[t] = + 10.4030996633557 + 0.271109839294935Carrièremogelijkheden[t] -0.0155622357020903Geen_Motivatie[t] + 0.622975722980002Persoonlijke_redenen[t] -0.0921577738086978Ouders[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)10.40309966335575.9901081.73670.0846220.042311
Carrièremogelijkheden0.2711098392949350.1016452.66720.0085430.004271
Geen_Motivatie-0.01556223570209030.208191-0.07470.940520.47026
Persoonlijke_redenen0.6229757229800020.0999826.230900
Ouders-0.09215777380869780.104029-0.88590.3771880.188594


Multiple Linear Regression - Regression Statistics
Multiple R0.545772649084669
R-squared0.297867784488897
Adjusted R-squared0.277949140077234
F-TEST (value)14.9542196915014
F-TEST (DF numerator)4
F-TEST (DF denominator)141
p-value3.27302074332181e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.65177907022895
Sum Squared Residuals6238.70923667816


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
15236.780707678079615.2192923219204
23936.39946117408572.60053882591434
34236.77346645494465.22653354505537
43538.3622880068664-3.36228800686641
53238.7376321145449-6.73763211454485
64946.69989064862142.30010935137861
73340.1661572180902-7.1661572180902
84737.78251324986549.2174867501346
94637.33969256821938.66030743178073
104037.74240566529412.25759433470587
113341.6132001267104-8.61320012671036
123939.9501889883772-0.950188988377244
133735.50792811797081.49207188202915
145647.58981570461288.4101842953872
153638.7315938672575-2.73159386725745
162439.4923469462766-15.4923469462766
175643.083035790674612.9169642093254
183243.679047548534-11.6790475485340
194139.00337847170861.99662152829137
202433.3688350481961-9.36883504819609
214237.10092284073244.89907715926764
224740.84038321767266.15961678232741
232529.4761709304864-4.47617093048643
243336.8516699931746-3.85166999317464
254340.18641887426022.81358112573976
264544.72740397645410.272596023545876
274438.85367313662275.14632686337731
284636.49496687698669.50503312301338
293132.9840901385186-1.98409013851858
303138.9380507731119-7.93805077311194
314239.2833482377552.71665176224497
322841.3133844322627-13.3133844322627
333835.86931799007062.1306820099294
345948.91183447798810.0881655220120
354343.6669710539591-0.666971053959148
362942.5150551228117-13.5150551228117
373841.2929869251209-3.29298692512086
383943.0379677871848-4.03796778718477
395041.84647248215758.15352751784254
404439.05408983412664.94591016587341
412934.2606251806352-5.26062518063517
422930.4880394048713-1.48803940487125
433641.2791665794508-5.27916657945082
444337.52816862212025.47183137787981
452839.5293611494402-11.5293611494402
463933.9751687460425.02483125395801
473532.58085079181552.41914920818449
484345.2002693400724-2.20026934007243
492830.0959300856431-2.09593008564309
504941.48802943700067.51197056299943
513339.3742923322231-6.37429233222307
523938.6861228005550.313877199444978
533637.5772612809217-1.57726128092173
542440.2121905670263-16.2121905670263
554741.48548763433355.51451236566653
563437.8883555183723-3.88835551837231
573340.1881500607993-7.18815006079926
584341.40660933094721.59339066905278
594142.5585252620946-1.55852526209465
604035.1455791142154.85442088578503
613943.6233777282606-4.6233777282606
625444.18222676742849.81777323257164
634338.53533767603714.46466232396293
644542.35462282346352.64537717653653
652936.0368683261383-7.03686832613827
664543.28291357399411.7170864260059
674741.65089105609335.34910894390667
683834.49820655789383.50179344210616
695246.25706996697535.74293003302474
703436.4537921675396-2.45379216753955
715646.81312069472829.1868793052718
722634.7176712322271-8.7176712322271
734244.0869882767681-2.08698827676815
743231.65323480644110.346765193558874
753940.4682556778175-1.46825567781749
763741.1894274218936-4.18942742189359
773741.5430351956107-4.54303519561071
785247.38806018028944.61193981971056
793134.8775626563278-3.87756265632776
803429.07292962272024.92707037727982
813841.0415871632553-3.04158716325533
822933.0993332090246-4.09933320902455
835239.027789930669212.9722100693308
844039.55271618701790.447283812982083
854738.69752452997368.30247547002641
863442.6544385179111-8.6544385179111
873742.479108044524-5.47910804452398
884339.31982548779733.68017451220266
893737.0924659771935-0.0924659771934753
905543.976985501977711.0230144980223
913639.9459052956781-3.9459052956781
922835.5059145259951-7.50591452599514
934742.57127652182574.42872347817429
943840.7931575963819-2.7931575963819
953739.0295318207012-2.02953182070121
963235.6423403906586-3.64234039065863
974738.31265643388058.68734356611954
984034.09926160738295.90073839261705
994541.96439124523923.03560875476082
1003745.2481590230263-8.24815902302633
1013842.6041321797689-4.6041321797689
1023733.86074838864383.13925161135624
1033537.6405880520989-2.64058805209892
1045044.76160916470985.23839083529018
1053231.04702429501080.952975704989153
1063241.830382035764-9.83038203576398
1073840.3468511736085-2.34685117360849
1083137.4448707750630-6.44487077506296
1092736.2552532110395-9.25525321103953
1103427.83623242429446.16376757570562
1114342.24864470398470.751355296015272
1122838.8004092680446-10.8004092680446
1134449.014719216059-5.01471921605904
1144340.45940645455912.54059354544095
1155344.39162853916258.60837146083747
1163338.6490959328353-5.64909593283527
1173636.5179188513518-0.517918851351792
1184641.44430026033024.55569973966981
1193638.2204986600718-2.22049866007176
1202432.5658274702978-8.56582747029783
1215045.18282936336654.81717063663355
1224031.4336342811368.56636571886398
1234044.9972981753452-4.99729817534521
1243240.4443724295484-8.44437242954835
1254945.22239803375333.77760196624669
1264741.73875247264675.26124752735333
1272832.7963015143301-4.79630151433012
1284140.80227656052080.197723439479178
1292541.1685017040603-16.1685017040603
1304633.787233567388712.2127664326113
1315341.562352913320611.4376470866794
1323435.6459619827577-1.64596198275774
1334039.2630865815850.736913418415
1344636.10690810975919.89309189024088
1353840.2367145089094-2.23671450890941
1365142.76564426854928.23435573145083
1373844.6317604615181-6.63176046151815
1384541.71192435849793.28807564150215
1394138.11693915684452.8830608431555
1404238.30192946961813.69807053038186
1413641.9816827064171-5.98168270641711
1424135.89078262208835.10921737791174
1433532.49031172162322.50968827837676
1444234.31201326927267.68798673072744
1453530.52574103774734.47425896225274
1463238.2055985249697-6.2055985249697


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.8391128739399430.3217742521201140.160887126060057
90.8441272025379480.3117455949241040.155872797462052
100.7760273918412350.4479452163175310.223972608158765
110.903140792703180.1937184145936380.0968592072968192
120.8493583869793870.3012832260412260.150641613020613
130.7818360592056580.4363278815886830.218163940794342
140.857966743351620.2840665132967590.142033256648379
150.8340276838000960.3319446323998080.165972316199904
160.9076012034176030.1847975931647940.0923987965823972
170.9522686424081980.09546271518360380.0477313575918019
180.9823481591370680.03530368172586410.0176518408629321
190.9729952752039060.05400944959218860.0270047247960943
200.974966545837180.05006690832564070.0250334541628204
210.9818195862989980.03636082740200490.0181804137010024
220.9805079675549250.0389840648901510.0194920324450755
230.9734402902020440.05311941959591220.0265597097979561
240.9650049013799280.0699901972401450.0349950986200725
250.952342785843760.09531442831248010.0476572141562401
260.9341979920427250.1316040159145510.0658020079572753
270.9227841705400540.1544316589198910.0772158294599456
280.9140345208423020.1719309583153960.085965479157698
290.896763170205990.2064736595880210.103236829794011
300.887635986629720.2247280267405590.112364013370279
310.8608364037439750.2783271925120500.139163596256025
320.9216197024832940.1567605950334120.0783802975167061
330.9030151598107070.1939696803785870.0969848401892933
340.9126472299537580.1747055400924830.0873527700462417
350.8894707469031010.2210585061937980.110529253096899
360.9533725657995480.09325486840090320.0466274342004516
370.940671823272390.1186563534552210.0593281767276104
380.9411548333820520.1176903332358960.0588451666179482
390.9445534893863670.1108930212272650.0554465106136327
400.934366022018380.1312679559632400.0656339779816198
410.936300635366630.1273987292667420.0636993646333709
420.9187657400008160.1624685199983680.0812342599991839
430.9138851965895190.1722296068209630.0861148034104813
440.9090625417364540.1818749165270930.0909374582635463
450.9412066379213840.1175867241572310.0587933620786157
460.9332832149476050.1334335701047900.0667167850523952
470.921979067803720.1560418643925600.0780209321962802
480.9034980408647880.1930039182704240.0965019591352118
490.8825571981316210.2348856037367580.117442801868379
500.8930022953238160.2139954093523670.106997704676183
510.8907848654445230.2184302691109540.109215134555477
520.8653104592335540.2693790815328920.134689540766446
530.8390740867083070.3218518265833870.160925913291693
540.9322014634446280.1355970731107450.0677985365553725
550.924547322032240.1509053559355190.0754526779677596
560.911992149664180.1760157006716410.0880078503358206
570.9207992975545250.158401404890950.079200702445475
580.901854987323530.196290025352940.09814501267647
590.88065325981480.23869348037040.1193467401852
600.8787436183542520.2425127632914950.121256381645748
610.8679021918847240.2641956162305530.132097808115276
620.8934445932086960.2131108135826080.106555406791304
630.8791303586393630.2417392827212730.120869641360637
640.8564785192808110.2870429614383770.143521480719189
650.8617978397556580.2764043204886850.138202160244342
660.8350781432954230.3298437134091540.164921856704577
670.8220758142098520.3558483715802950.177924185790148
680.7989619554664120.4020760890671760.201038044533588
690.7856447457497060.4287105085005870.214355254250294
700.7528332256583720.4943335486832560.247166774341628
710.7835534317470640.4328931365058710.216446568252935
720.8040521597358520.3918956805282950.195947840264148
730.7734995678557970.4530008642884060.226500432144203
740.7405291997889640.5189416004220720.259470800211036
750.7021508920853470.5956982158293050.297849107914653
760.6789347203694980.6421305592610030.321065279630502
770.6546178461337710.6907643077324580.345382153866229
780.6318792210679330.7362415578641350.368120778932067
790.5997705283704850.8004589432590310.400229471629516
800.5810680844435280.8378638311129440.418931915556472
810.5450947550160010.9098104899679970.454905244983999
820.5230340959959010.9539318080081980.476965904004099
830.6533583704922790.6932832590154430.346641629507721
840.608250932507190.783498134985620.39174906749281
850.63203271831380.7359345633723990.367967281686200
860.660693761968010.678612476063980.33930623803199
870.6492415321831990.7015169356336020.350758467816801
880.6150790692184890.7698418615630220.384920930781511
890.5678547725085660.8642904549828680.432145227491434
900.6666487616438470.6667024767123060.333351238356153
910.6622602856127040.6754794287745920.337739714387296
920.6768986972506850.6462026054986310.323101302749316
930.6456431956211370.7087136087577250.354356804378863
940.6076942328248110.7846115343503780.392305767175189
950.5605158838454730.8789682323090540.439484116154527
960.5237319353215450.952536129356910.476268064678455
970.5584935162057680.8830129675884640.441506483794232
980.5490284478814630.9019431042370740.450971552118537
990.5056125859324280.9887748281351450.494387414067572
1000.5360594030205290.9278811939589420.463940596979471
1010.5108134291965540.9783731416068930.489186570803446
1020.4669708475753040.9339416951506070.533029152424696
1030.4273364977826630.8546729955653250.572663502217337
1040.4098039033657270.8196078067314540.590196096634273
1050.3588229851745390.7176459703490780.641177014825461
1060.4288581363188640.8577162726377280.571141863681136
1070.3785657267700930.7571314535401850.621434273229907
1080.4276632598106980.8553265196213960.572336740189302
1090.4676944427413020.9353888854826030.532305557258699
1100.4381315906870660.8762631813741320.561868409312934
1110.3814943826979860.7629887653959720.618505617302014
1120.4722802481303630.9445604962607270.527719751869637
1130.4605620728507050.921124145701410.539437927149295
1140.4051426139331420.8102852278662840.594857386066858
1150.4195961374526420.8391922749052840.580403862547358
1160.4070626061863460.8141252123726920.592937393813654
1170.3627449826676730.7254899653353470.637255017332327
1180.3224157909297650.644831581859530.677584209070235
1190.2800756105625190.5601512211250380.719924389437481
1200.3328476924966390.6656953849932780.667152307503361
1210.2987486591623720.5974973183247450.701251340837628
1220.3027430488469660.6054860976939310.697256951153034
1230.2626694360127770.5253388720255540.737330563987223
1240.2832378511238040.5664757022476090.716762148876195
1250.2464866260058540.4929732520117070.753513373994146
1260.2187028997928770.4374057995857530.781297100207123
1270.2741530899806250.548306179961250.725846910019375
1280.2120229802233730.4240459604467460.787977019776627
1290.7062211310914320.5875577378171360.293778868908568
1300.7652178663449970.4695642673100070.234782133655003
1310.9382257871164260.1235484257671480.0617742128835742
1320.9304062739673860.1391874520652280.0695937260326142
1330.8832945930308930.2334108139382150.116705406969107
1340.9172924179978330.1654151640043330.0827075820021667
1350.9722991456234960.05540170875300760.0277008543765038
1360.973201482641490.05359703471701970.0267985173585098
1370.9850676872218110.02986462555637720.0149323127781886
1380.9495735725880460.1008528548239070.0504264274119537


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level40.0305343511450382OK
10% type I error level130.099236641221374OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/10yuxz1292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/10yuxz1292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/1rbin1292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/1rbin1292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/22kh81292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/22kh81292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/32kh81292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/32kh81292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/42kh81292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/42kh81292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/5cthb1292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/5cthb1292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/6cthb1292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/6cthb1292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/7nkgw1292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/7nkgw1292753957.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/8nkgw1292753957.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292753853a220imer49u1pb6/8nkgw1292753957.ps (open in new window)


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