Home » date » 2010 » Dec » 29 »

*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: Wed, 29 Dec 2010 19:10:36 +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/29/t1293649846pv3jnspk1kw30vh.htm/, Retrieved Wed, 29 Dec 2010 20:10:56 +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/29/t1293649846pv3jnspk1kw30vh.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13 13 14 13 3 12 12 8 13 5 15 10 12 16 6 12 9 7 12 6 10 10 10 11 5 12 12 7 12 3 15 13 16 18 8 9 12 11 11 4 12 12 14 14 4 11 6 6 9 4 11 5 16 14 6 11 12 11 12 6 15 11 16 11 5 7 14 12 12 4 11 14 7 13 6 11 12 13 11 4 10 12 11 12 6 14 11 15 16 6 10 11 7 9 4 6 7 9 11 4 11 9 7 13 2 15 11 14 15 7 11 11 15 10 5 12 12 7 11 4 14 12 15 13 6 15 11 17 16 6 9 11 15 15 7 13 8 14 14 5 13 9 14 14 6 16 12 8 14 4 13 10 8 8 4 12 10 14 13 7 14 12 14 15 7 11 8 8 13 4 9 12 11 11 4 16 11 16 15 6 12 12 10 15 6 10 7 8 9 5 13 11 14 13 6 16 11 16 16 7 14 12 13 13 6 15 9 5 11 3 5 15 8 12 3 8 11 10 12 4 11 11 8 12 6 16 11 13 14 7 17 11 15 14 5 9 15 6 8 4 9 11 12 13 5 13 12 16 16 6 10 12 5 13 6 6 9 15 11 6 12 12 12 14 5 8 12 8 13 4 14 13 13 13 5 12 11 14 13 5 11 9 12 12 4 16 9 16 16 6 8 11 10 15 2 15 11 15 15 8 7 12 8 12 3 16 12 16 14 6 14 9 19 12 6 16 11 14 15 6 9 9 6 12 5 14 12 13 13 5 11 12 15 12 6 13 12 7 12 5 15 12 13 13 6 5 14 4 5 2 15 11 14 13 5 13 12 13 13 5 11 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Herman Ole Andreas Wold' @ www.yougetit.org


Multiple Linear Regression - Estimated Regression Equation
a[t] = + 0.303577528406638 + 0.0945470254137573b[t] + 0.243821570238501c[t] + 0.348903064267891d[t] + 0.627086448309146e[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.3035775284066381.4251180.2130.8315990.4158
b0.09454702541375730.0959580.98530.3260540.163027
c0.2438215702385010.0613743.97270.000115.5e-05
d0.3489030642678910.0964793.61640.0004070.000203
e0.6270864483091460.1560334.01899.2e-054.6e-05


Multiple Linear Regression - Regression Statistics
Multiple R0.706541003093969
R-squared0.499200189053031
Adjusted R-squared0.485933968895496
F-TEST (value)37.6294214271328
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10551474685275
Sum Squared Residuals669.412044731377


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.36319002253451.63680997746553
21211.0598864723080.940113527691957
31513.51987434354731.48012565645266
41210.81060720986951.18939279013048
51010.6606294334218-0.66062943342175
6129.212988941183372.78701105881663
71516.7307807258967-1.7307807258967
8910.4664586061786-1.46645860617862
91212.2446325096978-0.244632509697798
10117.98226247396783.0177375260322
111113.3246193688968-2.32461936889679
121112.0695345670648-1.06953456706481
131512.21810588026652.78189411973348
14711.2482772915125-4.24827729151253
151111.6322454012062-0.632245401206208
161110.95410174665560.045898253344375
171012.0695345670648-2.06953456706481
181414.3458860796766-0.345886079676615
19108.698819171275081.30118082872492
2069.50608033863284-3.50608033863284
21118.651164480900842.34883551909916
221514.38024789347940.619752106520631
231111.6253812457601-0.625381245760124
24129.491172325224622.50882767477538
251413.39372391228670.6062760877133
261514.83352922015360.166470779846383
27914.6240694637179-5.62406946371787
281312.49353085635190.506469143648084
291313.2151643300748-0.215164330074818
301610.78170308826685.21829691173321
31138.499190651831934.50080934816807
321213.5878947395298-1.58789473952983
331414.4747949188931-0.474794918893127
341110.05461192234390.945388077656125
35910.4664586061786-1.46645860617862
361614.24080458564721.75919541435277
371212.87242218963-0.872422189629978
38109.19153908816770.8084609118323
391313.0553553166344-0.0553553166344419
401615.21679409822430.783205901775738
411412.90608077180971.0939192281903
42158.09280166019726.9071983398028
4359.74045158766314-4.74045158766314
44810.4769930747943-2.47699307479426
451111.2435228309355-0.243522830935547
461613.7875232589732.21247674102702
471713.02099350283173.97900649716831
4898.484282638423720.515717361576282
49911.9406257278483-2.94062572784829
501314.6842546753289-1.68425467532887
511010.9555082099017-0.955508209901692
52612.4122767075096-6.41227670750965
531212.3840758175299-0.384075817529942
54810.4328000239989-2.4328000239989
551412.37354134891431.62645865108569
561212.4282688683253-0.428268868325296
571110.77554216444370.224457835556256
581614.40061359908761.5993864009124
59810.2695293709796-2.26952937097964
601515.251155912027-0.251155912027016
6179.45681051142187-2.45681051142187
621613.98644854679312.01355145320691
631413.73646605273150.263533947268459
641613.75316144517022.24683855482978
6599.93969919132189-0.939699191321885
661412.27899432350061.72100567649945
671113.0448208480188-2.04482084801881
681310.46716183780172.53283816219834
691512.90608077180972.0939192281903
7055.601210383111-0.601210383110995
711512.42826886832532.5717311316747
721312.27899432350060.721005676499447
731112.0457072218777-1.04570722187768
741113.9782324466372-2.97823244663722
751212.4731651507437-0.473165150743683
761213.3937239122867-1.3937239122867
771212.2684598548849-0.268459854884919
781211.90080622184550.099193778154476
791410.78170308826683.21829691173321
8067.99317785836783-1.99317785836783
8179.84007538949251-2.84007538949251
821411.98989555505932.01010444494074
831413.85824293919960.141757060800387
841011.2533540679281-1.25335406792815
85138.725345800706364.27465419929364
861212.4079031627171-0.407903162717064
8799.29154380578147-0.291543805781473
881212.0164221844905-0.0164221844905469
891615.00733434178850.992665658211485
901010.2331715045558-0.233171504555755
911413.12677822848410.873221771515889
921013.5093398749317-3.50933987493172
931615.3113411236380.688658876361981
941513.44845143169771.55154856830231
951211.34790109334190.652098906658097
96109.734993895463120.265006104536879
97810.2389515125944-2.23895151259441
9888.60972983806134-0.609729838061341
991112.8424339206198-1.84243392061981
1001312.41843763133270.581562368667303
1011615.46061566846280.539384331537237
1021614.71861648913161.28138351086837
1031415.8149764249307-1.81497642493067
104118.885154814146742.11484518585326
10546.96753760279542-2.96753760279542
1061414.5700451759299-0.570045175929917
107910.3480842355777-1.34808423557775
1081415.251155912027-1.25115591202702
109810.4531657296071-2.45316572960713
110810.9016925957044-2.9016925957044
1111112.1949817667024-1.19498176670243
1121213.6426222589408-1.64262225894082
1131111.4431513503787-0.443151350378693
1141413.60388690034550.39611309965452
1151514.3360548426840.663945157315984
1161613.40425838090232.59574161909767
1171613.49880540631612.50119459368391
1181112.7336821134209-1.73368211342087
1191413.74262697655460.257373023445409
1201410.96463621527133.03536378472874
1211211.40808630495290.591913695047094
1221412.56700894453441.43299105546559
123810.2331715045558-2.23317150455576
1241313.8371740019683-0.837174001968348
1251613.74262697655462.25737302344541
1261210.92114639609891.07885360390106
1271615.45078443147020.549215568529837
1281213.3937239122867-1.3937239122867
1291111.5182445753979-0.518244575397912
13046.42684120345586-2.42684120345586
1311615.45078443147020.549215568529837
1321512.56771217615742.43228782384256
1331011.4795092168026-1.47950921680258
1341313.2107907852822-0.210790785282235
1351513.25498383607761.74501616392241
1361210.67662159423741.3233784057626
1371413.64807995114080.351920048859167
138710.6759183626144-3.67591836261437
1391914.09153004082254.90846995917752
1401212.6826249071794-0.68262490717943
1411212.2888255604932-0.288825560493152
1421313.4988054063161-0.49880540631609
1431512.94243863823362.05756136176642
14488.28902766377315-0.289027663773155
1451210.92044316447591.0795568355241
1461010.8062336650769-0.806233665076948
147811.4087895365759-3.40878953657594
1481014.3751711170638-4.37517111706375
1491513.89190152137931.10809847862067
1501614.61423822672531.38576177327473
1511313.1947986244666-0.194798624466586
1521615.06751955339950.932480446600482
153910.2331715045558-1.23317150455576
1541413.17097127927950.829028720720535
1551412.70645225236661.29354774763345
1561210.16444787695021.83555212304975


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.06025482791299410.1205096558259880.939745172087006
90.0406954098125640.0813908196251280.959304590187436
100.01701945403569110.03403890807138230.98298054596431
110.03324462410852530.06648924821705050.966755375891475
120.01685239051616030.03370478103232070.98314760948384
130.3400622488499660.6801244976999320.659937751150034
140.6873835015880530.6252329968238950.312616498411947
150.6012092341853730.7975815316292550.398790765814627
160.5105821672358610.9788356655282780.489417832764139
170.4535987466287950.907197493257590.546401253371205
180.3707235097170030.7414470194340060.629276490282997
190.3013179996571590.6026359993143190.698682000342841
200.5975462860960890.8049074278078230.402453713903911
210.5348627666316890.9302744667366220.465137233368311
220.5029403951166360.9941192097667280.497059604883364
230.4328018044117470.8656036088234950.567198195588253
240.4185839827894390.8371679655788780.581416017210561
250.3835480252706630.7670960505413250.616451974729338
260.3290064505902180.6580129011804350.670993549409782
270.589952522480590.8200949550388190.410047477519409
280.5317834451220430.9364331097559150.468216554877957
290.4704994501200950.940998900240190.529500549879905
300.6459148446975520.7081703106048950.354085155302448
310.7776194645504560.4447610708990870.222380535449544
320.7381322898998420.5237354202003160.261867710100158
330.6945479331478840.6109041337042330.305452066852116
340.6502482964694070.6995034070611860.349751703530593
350.6428795252159050.7142409495681890.357120474784095
360.6645268017999460.6709463964001070.335473198200054
370.6236498757545080.7527002484909840.376350124245492
380.5742704823215970.8514590353568060.425729517678403
390.5234171683315450.953165663336910.476582831668455
400.5065545935911010.9868908128177980.493445406408899
410.4782864758028270.9565729516056530.521713524197173
420.7847179161315720.4305641677368560.215282083868428
430.9463041867797540.1073916264404930.0536958132202463
440.9574280168490020.08514396630199580.0425719831509979
450.9450185032535570.1099629934928860.0549814967464428
460.9519147494393270.0961705011213460.048085250560673
470.9774773956164270.04504520876714680.0225226043835734
480.9704046328422150.05919073431557030.0295953671577851
490.9780464314618140.04390713707637240.0219535685381862
500.9749737380156960.05005252396860710.0250262619843035
510.969720419682740.0605591606345180.030279580317259
520.9971950944675510.005609811064897310.00280490553244866
530.9960151860001930.00796962799961490.00398481399980745
540.9970664581600680.005867083679864090.00293354183993205
550.9967770542126450.006445891574709370.00322294578735469
560.9954521634667750.009095673066450140.00454783653322507
570.9936983097251510.0126033805496980.006301690274849
580.9928244923345930.01435101533081340.00717550766540671
590.9948755413886040.01024891722279220.00512445861139612
600.9931078366989610.01378432660207710.00689216330103856
610.9943035599736130.01139288005277440.00569644002638722
620.994618210572370.01076357885525850.00538178942762927
630.9927116967501250.01457660649975080.00728830324987541
640.993145262741360.01370947451727910.00685473725863956
650.9915210335169250.01695793296615010.00847896648307504
660.9906400312074340.01871993758513180.00935996879256588
670.9905792676869370.01884146462612560.00942073231306278
680.9920527826438850.01589443471222920.0079472173561146
690.9921794112651230.01564117746975430.00782058873487714
700.9895339729612780.0209320540774440.010466027038722
710.9911188159670930.01776236806581430.00888118403290715
720.988299003951780.02340199209643880.0117009960482194
730.9853847296478660.02923054070426820.0146152703521341
740.9896747351764060.02065052964718710.0103252648235935
750.9861518732867260.02769625342654830.0138481267132742
760.9839573921778190.03208521564436280.0160426078221814
770.978848235528330.04230352894333920.0211517644716696
780.9721454368926180.0557091262147640.027854563107382
790.9822727781780780.03545444364384430.0177272218219222
800.981837554459240.03632489108151890.0181624455407594
810.9854206847977940.02915863040441250.0145793152022063
820.9860931986057190.02781360278856260.0139068013942813
830.9813073644520550.03738527109588990.0186926355479449
840.9772777699119120.04544446017617690.0227222300880884
850.9937818370323720.01243632593525510.00621816296762756
860.991538283792010.01692343241598010.00846171620799004
870.98850468802550.02299062394899830.0114953119744991
880.9849102225631930.03017955487361350.0150897774368067
890.9808971934403340.03820561311933250.0191028065596663
900.9747753662833420.05044926743331540.0252246337166577
910.969338911513750.0613221769724980.030661088486249
920.9831730816758790.03365383664824280.0168269183241214
930.9780670412970310.04386591740593750.0219329587029687
940.9745862171231950.050827565753610.025413782876805
950.9676912335440750.06461753291184910.0323087664559245
960.9588710609814570.08225787803708510.0411289390185425
970.9560434051392860.08791318972142860.0439565948607143
980.9440023909730540.1119952180538920.0559976090269459
990.9415310416885330.1169379166229340.058468958311467
1000.927235535914430.1455289281711390.0727644640855697
1010.9096423520111910.1807152959776170.0903576479888087
1020.893626100634780.2127477987304410.10637389936522
1030.9046921340887070.1906157318225870.0953078659112934
1040.9332530481912390.1334939036175230.0667469518087613
1050.9330786262369960.1338427475260080.0669213737630038
1060.9163290922377540.1673418155244920.083670907762246
1070.9003312966006640.1993374067986720.0996687033993362
1080.8968412946739830.2063174106520340.103158705326017
1090.897519008070580.204961983858840.10248099192942
1100.9195621391629540.1608757216740920.0804378608370458
1110.91161627005250.1767674598950010.0883837299475005
1120.9383769188566260.1232461622867480.0616230811433741
1130.9207273068043120.1585453863913770.0792726931956884
1140.8986139378332830.2027721243334330.101386062166717
1150.8725093718426540.2549812563146910.127490628157346
1160.8711970883278740.2576058233442520.128802911672126
1170.8779524793149630.2440950413700740.122047520685037
1180.8697217026380880.2605565947238240.130278297361912
1190.8368168781945850.3263662436108310.163183121805415
1200.8844673073692350.2310653852615310.115532692630765
1210.860662772722780.2786744545544390.139337227277219
1220.8387255467957450.3225489064085110.161274453204255
1230.83116045772160.3376790845567980.168839542278399
1240.7948497716061770.4103004567876470.205150228393823
1250.79485241066910.41029517866180.2051475893309
1260.7785030718169870.4429938563660260.221496928183013
1270.7300541982644710.5398916034710580.269945801735529
1280.7050093286279470.5899813427441060.294990671372053
1290.7229483003899980.5541033992200050.277051699610002
1300.7186493105007460.5627013789985080.281350689499254
1310.6625361731803120.6749276536393760.337463826819688
1320.6512050199096170.6975899601807660.348794980090383
1330.6250240742971170.7499518514057660.374975925702883
1340.5538353589992710.8923292820014580.446164641000729
1350.5290316728198140.9419366543603730.470968327180186
1360.5249689801089280.9500620397821440.475031019891072
1370.4518375920058130.9036751840116270.548162407994187
1380.5218511957828370.9562976084343260.478148804217163
1390.8500554446455770.2998891107088460.149944555354423
1400.877750977115010.244498045769980.12224902288499
1410.8442131212104780.3115737575790440.155786878789522
1420.7772333154367740.4455333691264520.222766684563226
1430.7493126862805940.5013746274388110.250687313719406
1440.6522203170475290.6955593659049420.347779682952471
1450.6428770048645410.7142459902709180.357122995135459
1460.7639182410131730.4721635179736540.236081758986827
1470.7316741929776480.5366516140447050.268325807022352
1480.8524624487800220.2950751024399550.147537551219978


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level50.0354609929078014NOK
5% type I error level430.304964539007092NOK
10% type I error level570.404255319148936NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/10qpdr1293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/10qpdr1293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/1j6gx1293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/1j6gx1293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/2cxx01293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/2cxx01293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/3cxx01293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/3cxx01293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/4cxx01293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/4cxx01293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/5n6wl1293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/5n6wl1293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/6n6wl1293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/6n6wl1293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/7ggw61293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/7ggw61293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/8ggw61293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/8ggw61293649830.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/9qpdr1293649830.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293649846pv3jnspk1kw30vh/9qpdr1293649830.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by