Home » date » 2010 » Nov » 18 »

WS7 Tutorial

*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: Thu, 18 Nov 2010 16:04:53 +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/Nov/18/t12900965061gj996g400gk7u2.htm/, Retrieved Thu, 18 Nov 2010 17:08:29 +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/Nov/18/t12900965061gj996g400gk7u2.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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 0.303577528406636 + 0.0945470254137575FindingFriends[t] + 0.2438215702385KnowingPeople[t] + 0.348903064267891Liked[t] + 0.627086448309147Celebrity[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.3035775284066361.4251180.2130.8315990.4158
FindingFriends0.09454702541375750.0959580.98530.3260540.163027
KnowingPeople0.24382157023850.0613743.97270.000115.5e-05
Liked0.3489030642678910.0964793.61640.0004070.000203
Celebrity0.6270864483091470.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.6294214271329
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.10551474685275
Sum Squared Residuals669.412044731376


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.36319002253451.63680997746547
21211.0598864723080.940113527691951
31513.51987434354741.48012565645264
41210.81060720986951.18939279013047
51010.6606294334218-0.660629433421751
6129.212988941183372.78701105881664
71516.7307807258967-1.73078072589671
8910.4664586061786-1.46645860617862
91212.2446325096978-0.244632509697797
10117.98226247396783.01773752603221
111113.3246193688968-2.32461936889679
121112.0695345670648-1.06953456706481
131512.21810588026652.78189411973349
14711.2482772915125-4.24827729151253
151111.6322454012062-0.632245401206211
161110.95410174665560.0458982533443776
171012.0695345670648-2.06953456706481
181414.3458860796766-0.345886079676616
19108.698819171275081.30118082872492
2069.50608033863283-3.50608033863283
21118.651164480900842.34883551909916
221514.38024789347940.61975210652063
231111.6253812457601-0.625381245760121
24129.491172325224622.50882767477538
251413.39372391228670.606276087713301
261514.83352922015360.166470779846384
27914.6240694637179-5.62406946371787
281312.49353085635190.506469143648087
291313.2151643300748-0.215164330074817
301610.78170308826685.21829691173321
31138.499190651831934.50080934816807
321213.5878947395298-1.58789473952983
331414.4747949188931-0.474794918893128
341110.05461192234390.945388077656127
35910.4664586061786-1.46645860617862
361614.24080458564721.75919541435278
371212.87242218963-0.87242218962998
38109.19153908816770.808460911832304
391313.0553553166344-0.0553553166344411
401615.21679409822430.783205901775738
411412.90608077180971.0939192281903
42158.09280166019726.9071983398028
4359.74045158766314-4.74045158766314
44810.4769930747943-2.47699307479425
451111.2435228309355-0.243522830935547
461613.7875232589732.21247674102702
471713.02099350283173.97900649716831
4898.484282638423720.515717361576283
49911.9406257278483-2.94062572784829
501314.6842546753289-1.68425467532887
511010.9555082099017-0.955508209901694
52612.4122767075096-6.41227670750964
531212.3840758175299-0.384075817529943
54810.4328000239989-2.4328000239989
551412.37354134891431.62645865108569
561212.4282688683253-0.428268868325295
571110.77554216444370.224457835556259
581614.40061359908761.5993864009124
59810.2695293709796-2.26952937097964
601515.251155912027-0.251155912027017
6179.45681051142187-2.45681051142187
621613.98644854679312.01355145320691
631413.73646605273150.263533947268463
641613.75316144517022.24683855482978
6599.93969919132188-0.939699191321884
661412.27899432350061.72100567649945
671113.0448208480188-2.04482084801881
681310.46716183780172.53283816219834
691512.90608077180972.0939192281903
7055.60121038311099-0.601210383110992
711512.42826886832532.57173113167471
721312.27899432350060.721005676499448
731112.0457072218777-1.04570722187768
741113.9782324466372-2.97823244663722
751212.4731651507437-0.473165150743683
761213.3937239122867-1.3937239122867
771212.2684598548849-0.268459854884918
781211.90080622184550.0991937781544784
791410.78170308826683.21829691173321
8067.99317785836783-1.99317785836783
8179.84007538949251-2.84007538949251
821411.98989555505932.01010444494074
831413.85824293919960.141757060800385
841011.2533540679281-1.25335406792814
85138.725345800706364.27465419929364
861212.4079031627171-0.407903162717064
8799.29154380578147-0.291543805781471
881212.0164221844905-0.016422184490546
891615.00733434178850.992665658211484
901010.2331715045558-0.233171504555754
911413.12677822848410.873221771515887
921013.5093398749317-3.50933987493172
931615.3113411236380.68865887636198
941513.44845143169771.55154856830232
951211.34790109334190.652098906658098
96109.734993895463120.26500610453688
97810.2389515125944-2.23895151259441
9888.60972983806134-0.609729838061339
991112.8424339206198-1.8424339206198
1001312.41843763133270.581562368667303
1011615.46061566846280.539384331537238
1021614.71861648913161.28138351086837
1031415.8149764249307-1.81497642493067
104118.885154814146742.11484518585326
10546.96753760279542-2.96753760279542
1061414.5700451759299-0.570045175929921
107910.3480842355777-1.34808423557774
1081415.251155912027-1.25115591202702
109810.4531657296071-2.45316572960713
110810.9016925957044-2.9016925957044
1111112.1949817667024-1.19498176670243
1121213.6426222589408-1.64262225894082
1131111.4431513503787-0.443151350378695
1141413.60388690034550.396113099654519
1151514.3360548426840.663945157315982
1161613.40425838090232.59574161909767
1171613.49880540631612.50119459368391
1181112.7336821134209-1.73368211342087
1191413.74262697655460.25737302344541
1201410.96463621527133.03536378472874
1211211.40808630495290.591913695047095
1221412.56700894453441.4329910554656
123810.2331715045558-2.23317150455575
1241313.8371740019683-0.837174001968348
1251613.74262697655462.25737302344541
1261210.92114639609891.07885360390106
1271615.45078443147020.549215568529835
1281213.3937239122867-1.3937239122867
1291111.5182445753979-0.518244575397912
13046.42684120345585-2.42684120345585
1311615.45078443147020.549215568529835
1321512.56771217615742.43228782384256
1331011.4795092168026-1.47950921680258
1341313.2107907852822-0.210790785282238
1351513.25498383607761.74501616392241
1361210.67662159423741.3233784057626
1371413.64807995114080.351920048859167
138710.6759183626144-3.67591836261437
1391914.09153004082254.90846995917752
1401212.6826249071794-0.682624907179428
1411212.2888255604931-0.288825560493149
1421313.4988054063161-0.49880540631609
1431512.94243863823362.05756136176642
14488.28902766377315-0.289027663773149
1451210.92044316447591.0795568355241
1461010.806233665077-0.806233665076951
147811.4087895365759-3.40878953657594
1481014.3751711170638-4.37517111706375
1491513.89190152137931.10809847862067
1501614.61423822672531.38576177327473
1511313.1947986244666-0.194798624466587
1521615.06751955339950.932480446600481
153910.2331715045558-1.23317150455575
1541413.17097127927950.829028720720535
1551412.70645225236651.29354774763345
1561210.16444787695021.83555212304975


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.06025482791299530.1205096558259910.939745172087005
90.04069540981256390.08139081962512790.959304590187436
100.01701945403569130.03403890807138270.982980545964309
110.0332446241085250.06648924821705010.966755375891475
120.01685239051616050.03370478103232110.98314760948384
130.3400622488499650.680124497699930.659937751150035
140.6873835015880520.6252329968238970.312616498411948
150.6012092341853720.7975815316292560.398790765814628
160.5105821672358630.9788356655282750.489417832764137
170.4535987466287940.9071974932575880.546401253371206
180.3707235097170030.7414470194340050.629276490282997
190.3013179996571590.6026359993143180.698682000342841
200.597546286096090.804907427807820.40245371390391
210.534862766631690.930274466736620.46513723336831
220.5029403951166370.9941192097667270.497059604883363
230.4328018044117460.8656036088234920.567198195588254
240.4185839827894390.8371679655788780.581416017210561
250.3835480252706620.7670960505413240.616451974729338
260.3290064505902190.6580129011804380.670993549409781
270.5899525224805920.8200949550388160.410047477519408
280.5317834451220430.9364331097559140.468216554877957
290.4704994501200940.9409989002401880.529500549879906
300.645914844697550.70817031060490.35408515530245
310.7776194645504570.4447610708990860.222380535449543
320.7381322898998420.5237354202003170.261867710100158
330.6945479331478840.6109041337042330.305452066852116
340.6502482964694070.6995034070611860.349751703530593
350.6428795252159040.7142409495681920.357120474784096
360.6645268017999450.6709463964001090.335473198200054
370.623649875754510.752700248490980.37635012424549
380.5742704823215980.8514590353568030.425729517678402
390.5234171683315460.9531656633369090.476582831668454
400.50655459359110.98689081281780.4934454064089
410.4782864758028280.9565729516056550.521713524197172
420.784717916131570.4305641677368590.21528208386843
430.9463041867797530.1073916264404930.0536958132202466
440.9574280168490020.08514396630199550.0425719831509978
450.9450185032535570.1099629934928860.0549814967464428
460.9519147494393270.09617050112134540.0480852505606727
470.9774773956164270.04504520876714690.0225226043835734
480.9704046328422150.05919073431557060.0295953671577853
490.9780464314618140.04390713707637240.0219535685381862
500.9749737380156960.05005252396860730.0250262619843037
510.969720419682740.0605591606345180.030279580317259
520.9971950944675510.005609811064897280.00280490553244864
530.9960151860001930.007969627999614830.00398481399980742
540.9970664581600680.005867083679864110.00293354183993206
550.9967770542126450.00644589157470940.0032229457873547
560.9954521634667750.009095673066450140.00454783653322507
570.9936983097251510.0126033805496980.006301690274849
580.9928244923345930.01435101533081330.00717550766540665
590.9948755413886040.01024891722279230.00512445861139614
600.9931078366989610.01378432660207710.00689216330103856
610.9943035599736130.01139288005277460.0056964400263873
620.994618210572370.01076357885525860.0053817894276293
630.9927116967501240.0145766064997510.00728830324987549
640.993145262741360.01370947451727920.00685473725863961
650.9915210335169250.01695793296615010.00847896648307504
660.9906400312074340.01871993758513190.00935996879256594
670.9905792676869370.01884146462612530.00942073231306266
680.9920527826438850.01589443471222940.00794721735611471
690.9921794112651230.01564117746975430.00782058873487717
700.9895339729612780.02093205407744420.0104660270387221
710.9911188159670930.01776236806581420.0088811840329071
720.988299003951780.02340199209643860.0117009960482193
730.9853847296478660.02923054070426820.0146152703521341
740.9896747351764060.0206505296471870.0103252648235935
750.9861518732867260.02769625342654810.013848126713274
760.9839573921778190.0320852156443630.0160426078221815
770.978848235528330.04230352894333890.0211517644716695
780.9721454368926180.05570912621476390.0278545631073819
790.9822727781780780.03545444364384410.017727221821922
800.981837554459240.03632489108151890.0181624455407594
810.9854206847977940.0291586304044130.0145793152022065
820.9860931986057190.02781360278856260.0139068013942813
830.9813073644520550.03738527109588950.0186926355479448
840.9772777699119120.04544446017617620.0227222300880881
850.9937818370323720.01243632593525510.00621816296762753
860.991538283792010.016923432415980.00846171620799002
870.98850468802550.02299062394899840.0114953119744992
880.9849102225631930.03017955487361370.0150897774368069
890.9808971934403340.03820561311933260.0191028065596663
900.9747753662833420.05044926743331570.0252246337166578
910.969338911513750.06132217697249790.030661088486249
920.9831730816758790.03365383664824280.0168269183241214
930.9780670412970310.04386591740593710.0219329587029686
940.9745862171231950.050827565753610.025413782876805
950.9676912335440760.06461753291184880.0323087664559244
960.9588710609814570.08225787803708510.0411289390185426
970.9560434051392860.08791318972142890.0439565948607145
980.9440023909730540.1119952180538910.0559976090269456
990.9415310416885330.1169379166229340.058468958311467
1000.927235535914430.1455289281711390.0727644640855697
1010.9096423520111910.1807152959776170.0903576479888085
1020.893626100634780.212747798730440.10637389936522
1030.9046921340887070.1906157318225860.0953078659112928
1040.9332530481912390.1334939036175230.0667469518087613
1050.9330786262369960.1338427475260070.0669213737630037
1060.9163290922377540.1673418155244920.0836709077622459
1070.9003312966006640.1993374067986710.0996687033993356
1080.8968412946739830.2063174106520330.103158705326017
1090.897519008070580.2049619838588390.102480991929419
1100.9195621391629540.1608757216740910.0804378608370456
1110.91161627005250.1767674598950010.0883837299475005
1120.9383769188566260.1232461622867480.061623081143374
1130.9207273068043110.1585453863913770.0792726931956885
1140.8986139378332840.2027721243334330.101386062166716
1150.8725093718426540.2549812563146910.127490628157346
1160.8711970883278750.2576058233442510.128802911672125
1170.8779524793149640.2440950413700730.122047520685036
1180.8697217026380880.2605565947238240.130278297361912
1190.8368168781945840.3263662436108330.163183121805416
1200.8844673073692340.2310653852615310.115532692630766
1210.860662772722780.2786744545544390.139337227277219
1220.8387255467957450.3225489064085110.161274453204255
1230.8311604577216010.3376790845567970.168839542278399
1240.7948497716061760.4103004567876480.205150228393824
1250.79485241066910.41029517866180.2051475893309
1260.7785030718169870.4429938563660250.221496928183013
1270.7300541982644710.5398916034710580.269945801735529
1280.7050093286279450.589981342744110.294990671372055
1290.7229483003899970.5541033992200060.277051699610003
1300.7186493105007460.5627013789985080.281350689499254
1310.6625361731803110.6749276536393780.337463826819689
1320.6512050199096170.6975899601807660.348794980090383
1330.6250240742971170.7499518514057660.374975925702883
1340.5538353589992710.8923292820014590.446164641000729
1350.5290316728198130.9419366543603750.470968327180187
1360.524968980108930.950062039782140.47503101989107
1370.4518375920058140.9036751840116280.548162407994186
1380.5218511957828360.9562976084343290.478148804217164
1390.8500554446455760.2998891107088480.149944555354424
1400.877750977115010.2444980457699810.12224902288499
1410.844213121210480.3115737575790410.155786878789521
1420.7772333154367750.445533369126450.222766684563225
1430.7493126862805940.5013746274388120.250687313719406
1440.6522203170475290.6955593659049420.347779682952471
1450.6428770048645420.7142459902709160.357122995135458
1460.7639182410131730.4721635179736540.236081758986827
1470.7316741929776480.5366516140447040.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/Nov/18/t12900965061gj996g400gk7u2/10514o1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/10514o1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/1zi7c1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/1zi7c1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/2zi7c1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/2zi7c1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/39r7f1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/39r7f1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/49r7f1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/49r7f1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/59r7f1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/59r7f1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/6k0oi1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/6k0oi1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/7dsnl1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/7dsnl1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/8dsnl1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/8dsnl1290096281.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/9dsnl1290096281.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/18/t12900965061gj996g400gk7u2/9dsnl1290096281.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