Home » date » 2010 » Dec » 12 »

mlr

*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, 12 Dec 2010 12:55:26 +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/12/t1292158569wh7qsticjjjg4vf.htm/, Retrieved Sun, 12 Dec 2010 13:56:09 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf.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 «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 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
PS[t] = + 7.46043060983698 + 0.328154021465218CM[t] -0.362736672389800Doubts_about_actions[t] + 0.186560236681879PE[t] + 0.0233844134026156PC[t] + 0.401270321441297O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.460430609836982.2481093.31850.0011310.000565
CM0.3281540214652180.0555445.90800
Doubts_about_actions-0.3627366723898000.107118-3.38639e-040.00045
PE0.1865602366818790.101141.84460.0670320.033516
PC0.02338441340261560.1286210.18180.8559730.427987
O0.4012703214412970.0717735.590800


Multiple Linear Regression - Regression Statistics
Multiple R0.605858798778077
R-squared0.367064884056814
Adjusted R-squared0.346380729941024
F-TEST (value)17.7461878306445
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value7.54951656745106e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.40927289715423
Sum Squared Residuals1778.34067815237


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.02361763335080.976382366649192
22522.39639210732352.60360789267647
33024.25298630725225.74701369274783
41920.2962579947228-1.29625799472283
52220.53862828528321.46137171471678
62223.1227812851809-1.12278128518093
72522.57360260838692.42639739161312
82319.45685945818933.54314054181066
91718.7937770436835-1.79377704368349
102121.6696775851730-0.669677585173036
111922.8153403514384-3.8153403514384
121923.3938848919955-4.39388489199547
131523.2200335336539-8.22003353365394
141617.0860954231925-1.08609542319246
152319.45982251795763.54017748204243
162724.07484238205532.92515761794465
172221.00194328868470.998056711315263
181416.535329320714-2.53532932071400
192224.0873202920243-2.08732029202431
202324.0090508616482-1.00905086164818
212321.56883817794231.4311618220577
222124.4545998179461-3.45459981794611
231922.4295524471459-3.42955244714589
241823.8367869289911-5.83678692899107
252023.1800605324662-3.18006053246622
262322.44835255960490.551647440395091
272523.32807873286811.67192126713187
281923.3532655211774-4.35326552117744
292423.8398299312470.160170068753002
302221.56922587366740.430774126332574
312525.1649483334544-0.164948333454416
322623.22321697753742.77678302246258
332922.70020388487516.29979611512492
343225.19655953738236.8034404626177
352521.58307941772023.41692058227981
362924.40994950651354.59005049348653
372824.94670560416253.0532943958375
381717.1062381095522-0.106238109552166
392826.07516352086011.92483647913992
402922.94307220494056.05692779505949
412627.52862185641-1.52862185640998
422523.46670945788321.53329054211676
431419.5469105942641-5.54691059426405
442522.10552217031042.89447782968955
452621.67803938243294.32196061756713
462020.3008968098917-0.300896809891658
471821.4213727878477-3.42137278784772
483224.66103622987577.33896377012431
492525.0045460489836-0.00454604898359165
502521.69155135775733.30844864224273
512320.84547496130682.15452503869318
522122.1588588066973-1.15885880669729
532024.0575114630031-4.05751146300312
541516.5269290283781-1.52692902837806
553026.7173902089883.28260979101198
562425.3394958960663-1.33949589606632
572624.31254918449231.68745081550775
582421.71725246129782.28274753870219
592221.49415047143090.505849528569085
601415.6462203516491-1.64622035164913
612422.2553595200761.74464047992401
622422.92037560857981.07962439142021
632423.35362015671940.646379843280559
642419.98505558381324.01494441618681
651918.51290616425470.487093835745272
663126.82086767642944.17913232357061
672226.6010375214530-4.60103752145305
682721.46976210052055.5302378994795
691917.73590694522341.26409305477656
702522.30440358960752.69559641039245
712024.9772106374541-4.97721063745406
722121.5026773832730-0.50267738327296
732727.4823128306108-0.482312830610752
742324.3803773473337-1.38037734733371
752525.6982731831007-0.698273183100738
762022.2330812773097-2.23308127730969
772119.24546706874021.75453293125985
782222.4516157406899-0.451615740689920
792323.0320339448358-0.0320339448358371
802524.05217644356390.947823556436075
812523.42308557988541.57691442011462
821723.8630492300674-6.86304923006741
831921.4391304477228-2.43913044772283
842523.97091329555031.02908670444972
851922.3733623294629-3.37336232946291
862023.1407040596382-3.14070405963825
872622.52387072181343.47612927818658
882320.80738427751352.19261572248651
892724.43619578844072.56380421155931
901720.8970807780462-3.8970807780462
911723.3435280898338-6.3435280898338
921920.191563551002-1.19156355100200
931719.7459731472925-2.74597314729248
942222.0165688176436-0.0165688176435826
952123.5510323826098-2.55103238260975
963228.63724483998533.36275516001471
972124.6834795872242-3.6834795872242
982124.3266944626333-3.32669446263334
991821.259817450436-3.259817450436
1001821.2889468496438-3.28894684964376
1012322.83953081416060.160469185839441
1021920.6492902959521-1.64929029595212
1032020.9576947616757-0.957694761675737
1042122.3255043730554-1.32550437305537
1052023.8525057494042-3.85250574940422
1061718.7741072251434-1.77410722514342
1071820.3006604066273-2.30066040662729
1081920.7496791060040-1.74967910600404
1092222.0682765809344-0.0682765809344119
1101518.7664416321540-3.76644163215395
1111418.8510893511519-4.85108935115190
1121826.6429142940772-8.64291429407725
1132421.41144878787982.58855121212023
1143523.562032711943511.4379672880565
1152919.21632460271889.78367539728123
1162121.9816944326307-0.981694432630689
1172520.49532081432834.50467918567166
1182018.49243029639511.50756970360488
1192223.2253187184531-1.22531871845307
1201316.8359413686559-3.83594136865588
1212623.21420021813262.78579978186736
1221716.88722239112380.112777608876169
1232520.09471363697434.90528636302571
1242020.7722734892362-0.77227348923623
1251918.12855439318590.871445606814121
1262122.6212243668162-1.62122436681623
1272221.07047528771720.929524712282782
1282422.70567391104881.29432608895116
1292122.9951676639565-1.99516766395646
1302625.4821958514860.517804148514021
1312420.59509309602053.40490690397949
1321620.2987397994430-4.29873979944297
1332322.37653195122490.623468048775057
1341820.8107987510593-2.81079875105926
1351622.3793138772619-6.37931387726185
1362624.06985436623751.93014563376249
1371919.0560620045677-0.0560620045676752
1382116.86661990375814.13338009624188
1392122.2168258710245-1.21682587102449
1402218.52601737704043.47398262295963
1412319.73402419127493.26597580872508
1422924.81240594107884.18759405892122
1432119.21565087437541.78434912562462
1442119.96394641313691.03605358686309
1452321.89278796226841.10721203773160
1462722.9960672725994.00393272740102
1472525.3746950753507-0.374695075350650
1482121.0001409137780-0.000140913778046401
1491017.1119616413152-7.1119616413152
1502022.6490195793518-2.64901957935177
1512622.57492372824553.42507627175453
1522423.64748326134840.352516738651611
1532931.6584752151628-2.65847521516283
1541918.98258268182110.017417318178872
1552422.09401617955111.90598382044895
1561920.7666852307848-1.76668523078483
1572423.44015542271860.559844577281407
1582221.82443709696720.175562903032760
1591723.7736200572454-6.77362005724542


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.3031671748716910.6063343497433820.696832825128309
100.1832719061613780.3665438123227560.816728093838622
110.3389657526651670.6779315053303330.661034247334833
120.2896088181375340.5792176362750680.710391181862466
130.8660476345142660.2679047309714680.133952365485734
140.8049343753023460.3901312493953080.195065624697654
150.7599021021059230.4801957957881550.240097897894077
160.697170058283160.605659883433680.30282994171684
170.6192827515251910.7614344969496170.380717248474809
180.5910386873954530.8179226252090950.408961312604548
190.5240253891279150.951949221744170.475974610872085
200.5182040233470260.9635919533059470.481795976652974
210.4978243196694550.995648639338910.502175680330545
220.4308793698654340.8617587397308680.569120630134566
230.3858946773320640.7717893546641280.614105322667936
240.434994510379910.869989020759820.56500548962009
250.4477210430820560.8954420861641120.552278956917944
260.3796057155477920.7592114310955840.620394284452208
270.3292817477595950.6585634955191890.670718252240405
280.3452913229534780.6905826459069570.654708677046522
290.2916634513073040.5833269026146080.708336548692696
300.2385028724348370.4770057448696730.761497127565163
310.1919525543454290.3839051086908570.808047445654571
320.2121741136405940.4243482272811880.787825886359406
330.3620847025213480.7241694050426950.637915297478652
340.5966832722808630.8066334554382740.403316727719137
350.5738366538928480.8523266922143040.426163346107152
360.6339974668983350.732005066203330.366002533101665
370.6250464751355140.7499070497289720.374953524864486
380.5812071018714410.8375857962571180.418792898128559
390.549265039489190.901469921021620.45073496051081
400.6340149807260260.7319700385479490.365985019273974
410.60269680699440.7946063860111990.397303193005599
420.5574937840280790.8850124319438430.442506215971921
430.6440455231616670.7119089536766660.355954476838333
440.6160009972083780.7679980055832440.383999002791622
450.6392042044274110.7215915911451780.360795795572589
460.5897039664504020.8205920670991960.410296033549598
470.5804433493207150.839113301358570.419556650679285
480.6916894681453150.616621063709370.308310531854685
490.6504936064723960.6990127870552090.349506393527605
500.6396856720783830.7206286558432350.360314327921617
510.6011762085280550.797647582943890.398823791471945
520.5602233061220130.8795533877559740.439776693877987
530.596548010136340.8069039797273210.403451989863660
540.5634095600235090.8731808799529810.436590439976491
550.61489342470360.77021315059280.3851065752964
560.5818554444291550.836289111141690.418144555570845
570.5421330768352510.9157338463294980.457866923164749
580.5110416534641810.9779166930716390.488958346535819
590.4639671439414380.9279342878828770.536032856058562
600.4227622766070280.8455245532140560.577237723392972
610.3898561495725370.7797122991450740.610143850427463
620.3500535873542720.7001071747085450.649946412645728
630.3092759614041220.6185519228082440.690724038595878
640.3422148706163030.6844297412326060.657785129383697
650.3007893406112010.6015786812224030.699210659388799
660.3146221898098260.6292443796196510.685377810190174
670.3767222998931580.7534445997863150.623277700106842
680.4537358102702800.9074716205405610.54626418972972
690.4151735985958460.8303471971916920.584826401404154
700.3989624309001430.7979248618002860.601037569099857
710.4658051335482980.9316102670965970.534194866451702
720.4205472185147670.8410944370295340.579452781485233
730.3794200836156610.7588401672313220.620579916384339
740.3439879474214350.687975894842870.656012052578565
750.3119416427304120.6238832854608230.688058357269588
760.2883223227826730.5766446455653460.711677677217327
770.2657600541081600.5315201082163190.73423994589184
780.2299636642113290.4599273284226580.770036335788671
790.1976096247202450.3952192494404910.802390375279755
800.1708897029030080.3417794058060160.829110297096992
810.1499277119968990.2998554239937970.850072288003101
820.2439587987737990.4879175975475990.7560412012262
830.2257696281323710.4515392562647420.774230371867629
840.1966305245031680.3932610490063360.803369475496832
850.1986355252872070.3972710505744140.801364474712793
860.1941090879224530.3882181758449060.805890912077547
870.2015667567121540.4031335134243090.798433243287846
880.1884416088080550.376883217616110.811558391191945
890.1762940990469130.3525881980938260.823705900953087
900.1813085945202810.3626171890405610.81869140547972
910.2585526515285140.5171053030570290.741447348471486
920.2242277450197670.4484554900395330.775772254980233
930.2074727718990610.4149455437981220.792527228100939
940.1766470053708140.3532940107416280.823352994629186
950.1618605312911050.323721062582210.838139468708895
960.1655959476425460.3311918952850920.834404052357454
970.1673739261214720.3347478522429440.832626073878528
980.1634576383143220.3269152766286440.836542361685678
990.1563495215565750.3126990431131490.843650478443425
1000.151198669338710.302397338677420.84880133066129
1010.1248112791346940.2496225582693880.875188720865306
1020.1046907682744890.2093815365489780.895309231725511
1030.08483471781537460.1696694356307490.915165282184625
1040.06916769519316890.1383353903863380.930832304806831
1050.07399200919051750.1479840183810350.926007990809482
1060.06100521051733470.1220104210346690.938994789482665
1070.05390697383997740.1078139476799550.946093026160023
1080.04722096954841730.09444193909683470.952779030451583
1090.03639850899195870.07279701798391740.963601491008041
1100.03589925779670310.07179851559340630.964100742203297
1110.04521251733502320.09042503467004650.954787482664977
1120.1809556831836490.3619113663672990.81904431681635
1130.1650544506177970.3301089012355950.834945549382203
1140.5973072309482380.8053855381035240.402692769051762
1150.8745101486783280.2509797026433430.125489851321672
1160.8449794584935530.3100410830128930.155020541506447
1170.8946327136175350.2107345727649290.105367286382465
1180.872794438000040.2544111239999210.127205561999960
1190.8476895587960550.3046208824078900.152310441203945
1200.8779717084798720.2440565830402570.122028291520128
1210.8576716573844740.2846566852310520.142328342615526
1220.8219494008906320.3561011982187360.178050599109368
1230.8504007252332240.2991985495335530.149599274766776
1240.8127759558628560.3744480882742870.187224044137144
1250.777274978352170.4454500432956610.222725021647830
1260.7328483037800980.5343033924398030.267151696219902
1270.6990319788557960.6019360422884080.300968021144204
1280.6596255452167970.6807489095664070.340374454783204
1290.6039978115214540.7920043769570920.396002188478546
1300.5426180058472160.9147639883055670.457381994152784
1310.5413969713934630.9172060572130740.458603028606537
1320.5415073068328980.9169853863342040.458492693167102
1330.4920184220027190.9840368440054390.507981577997281
1340.4442985071129760.8885970142259520.555701492887024
1350.5968431137570330.8063137724859350.403156886242967
1360.5602255371199120.8795489257601770.439774462880088
1370.4880603972503480.9761207945006950.511939602749652
1380.5004657470716310.9990685058567380.499534252928369
1390.4286773557970480.8573547115940960.571322644202952
1400.3923947448995890.7847894897991770.607605255100411
1410.3578991219123230.7157982438246470.642100878087677
1420.4175660577931260.8351321155862520.582433942206874
1430.5709504908183460.8580990183633080.429049509181654
1440.4976619352808620.9953238705617230.502338064719138
1450.416814948413820.833629896827640.58318505158618
1460.4119343683938630.8238687367877260.588065631606137
1470.3604609236692450.7209218473384910.639539076330754
1480.2510712087408650.5021424174817310.748928791259135
1490.4565674196640470.9131348393280950.543432580335953
1500.3855213410646060.7710426821292120.614478658935394


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 level40.0281690140845070OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/10sz7v1292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/10sz7v1292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/1lha11292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/1lha11292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/2lha11292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/2lha11292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/3e8rm1292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/3e8rm1292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/4e8rm1292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/4e8rm1292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/5e8rm1292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/5e8rm1292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/67z871292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/67z871292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/7h8pa1292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/7h8pa1292158515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/8h8pa1292158515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292158569wh7qsticjjjg4vf/8h8pa1292158515.ps (open in new window)


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