Home » date » 2010 » Dec » 11 »

Meervoudige regressie: Inclusief geslacht

*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: Sat, 11 Dec 2010 18:27:12 +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/11/t1292091956ucirci2hgxibtuz.htm/, Retrieved Sat, 11 Dec 2010 19:25:59 +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/11/t1292091956ucirci2hgxibtuz.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 2 2 12 12 8 13 5 1 1 15 10 12 16 6 0 1 12 9 7 12 6 3 1 10 10 10 11 5 3 2 12 12 7 12 3 1 2 15 13 16 18 8 3 1 9 12 11 11 4 1 1 12 12 14 14 4 4 1 11 6 6 9 4 0 1 11 5 16 14 6 3 2 11 12 11 12 6 2 1 15 11 16 11 5 4 1 7 14 12 12 4 3 2 11 14 7 13 6 1 2 11 12 13 11 4 1 1 10 12 11 12 6 2 1 14 11 15 16 6 3 2 10 11 7 9 4 1 1 6 7 9 11 4 1 2 11 9 7 13 2 2 1 15 11 14 15 7 3 2 11 11 15 10 5 4 1 12 12 7 11 4 2 2 14 12 15 13 6 1 1 15 11 17 16 6 2 2 9 11 15 15 7 2 2 13 8 14 14 5 4 1 13 9 14 14 6 2 2 16 12 8 14 4 3 1 13 10 8 8 4 3 1 12 10 14 13 7 3 2 14 12 14 15 7 4 1 11 8 8 13 4 2 2 9 12 11 11 4 2 1 16 11 16 15 6 4 2 12 12 10 15 6 3 1 10 7 8 9 5 4 2 13 11 14 13 6 2 1 16 11 16 16 7 5 1 14 12 13 13 6 3 2 15 9 5 11 3 1 1 5 15 8 12 3 1 1 8 11 10 12 4 1 2 11 11 8 12 6 2 1 16 11 13 14 7 3 2 17 11 15 14 5 9 1 9 15 6 8 4 0 2 9 11 12 13 5 0 1 13 12 16 16 6 2 1 10 12 5 13 6 2 1 6 9 15 11 6 3 2 12 12 12 14 5 1 2 8 12 8 13 4 2 2 14 13 13 13 5 0 2 12 11 14 13 5 5 1 11 9 1 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'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = + 1.20820716919088 + 0.13002278384503FindingFriends[t] + 0.22210132830252KnowingPeople[t] + 0.337203746175027Liked[t] + 0.569203382109655Celebrity[t] + 0.234237609027133SumFriends1[t] -0.826628007906952Gender[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.208207169190881.4843050.8140.416950.208475
FindingFriends0.130022783845030.0945581.37510.1711760.085588
KnowingPeople0.222101328302520.06283.53670.000540.00027
Liked0.3372037461750270.0948313.55580.0005050.000253
Celebrity0.5692033821096550.153763.70190.0003010.00015
SumFriends10.2342376090271330.1185171.97640.0499550.024978
Gender-0.8266280079069520.344691-2.39820.0177150.008857


Multiple Linear Regression - Regression Statistics
Multiple R0.72642302133931
R-squared0.527690405931731
Adjusted R-squared0.508671227647103
F-TEST (value)27.7451737417185
F-TEST (DF numerator)6
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.05842445387573
Sum Squared Residuals631.329573614728


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11310.91440000425622.08559999574375
21211.18256641369520.817433586304789
31513.15750317082281.84249682917716
41211.27087158784650.729128412153506
51010.3341632204075-0.33416322040745
6128.65822656709143.3417734329086
71516.9515039192188-1.95150391921877
8910.6052595241431-1.60525952414306
91212.9858875746571-0.985887574657101
10117.80597107818313.1940289218169
111112.5974718916322-1.59747189163215
121112.3151076435645-1.31510764356453
131512.85765959100172.14234040899832
14711.066457376458-4.06645737645798
151110.96308602728550.036913972714543
161111.0494621807481-0.0494621807481023
171012.3151076435645-2.31510764356453
181413.82991475874990.170085241250129
19108.91242393473791.0875760652621
2068.68431494040592-2.68431494040592
21119.097024196555771.90297580344423
221513.8398130663821.16018693361802
231112.2983545165241-1.29835451652414
24129.124463812053162.87553618794684
251413.30647909392250.693520906077494
261514.03987980632780.960120193672223
27913.8276767856574-4.82767678565737
281313.0349998213866-0.0349998213866353
291312.43912276138010.560877238619896
301611.41904199581484.58095800418515
31139.135773951074633.86422604892537
321213.0353827901869-1.03538279018689
331415.0307014671611-1.03070146716109
34119.500881497325621.49911850267438
35910.8394971331702-1.8394971331702
361613.94904994990452.0509500500955
371213.3388551628142-1.33885516281423
38109.05972232894440.9402776710556
391313.1885925908021-0.188592590802089
401615.91632269512330.0836773048767376
411412.50412364746481.49587635253522
42158.31337982068326.6866201793168
43510.097024254836-5.09702425483596
4489.76371115026359-1.76371115026359
451111.5187808748119-0.518780874811944
461613.28050799190442.71949200809557
471714.81835754635992.18164245364009
4897.812344378706391.18765562129361
49911.7067113340331-2.70671133403313
501314.7744292697772-1.77442926977724
511011.3197034199244-1.31970341992444
52611.8838504601847-5.88385046018467
531211.58154746517340.418452534826633
54810.0209726327057-2.02097263270574
551411.36223022211882.63776977788124
561213.3221020357738-1.32210203577383
571111.0087338561127-0.0087338561126512
581614.85283613629641.14716386370359
59810.1053908426236-2.10539084262362
601514.75503295761970.244967042380292
6178.64609028636679-1.64609028636679
621613.74186898757452.2581310124255
631413.46761230942250.532387690577533
641613.6287624741252.37123752587499
65910.7138044864615-1.71380448646145
661412.52731066423491.47268933576506
671112.8453601669219-1.84536016692193
68139.796633331310713.20336666868929
691513.56498926439891.43501073560114
7055.55657615356619-0.556576153566193
711513.32210203577381.67789796422617
721312.99578588228920.00421411771079032
731111.9321361801072-0.932136180107215
741113.5291408664244-2.52914086642436
751213.0828423684063-1.08284236840628
761213.7749543119768-1.77495431197677
771212.7764686392346-0.7764686392346
781212.241457137882-0.241457137881956
791411.18480438678772.81519561321228
8068.35634611841115-2.35634611841115
8179.22742994920106-2.22742994920106
821412.68188642418081.31811357581921
831414.4465777190789-0.446577719078915
841011.4858586937648-1.48585869376482
85138.682499128540634.31750087145937
861211.84060374780510.159396252194869
8798.879338610335630.120661389664373
881212.1074015807548-0.107401580754807
891615.00140684737150.998593152628547
901010.0100850400153-0.0100850400153331
911413.31179851611710.68820148388291
921013.8751363638768-3.87513636387676
931615.81210786994120.18789213005884
941513.73701007258921.26298992741077
951211.023491078730.976508921269972
96109.704717930208370.29528206979163
97810.2132505633696-2.21325056336964
9888.34807946761351-0.348079467613512
991112.0771003416004-1.07710034160045
1001312.88654899876670.113451001233307
1011615.90418641439860.0958135856013505
1021615.25280279546360.747197204536387
1031414.8701180411858-0.87011804118579
104119.352047705905411.64795229409459
10546.72250374906121-2.72250374906121
1061414.9444884570536-0.944488457053594
107910.9188932847477-1.91889328474767
1081415.4577457847011-1.45774578470111
109810.5655204845659-2.56552048456591
110810.859757933013-2.85975793301298
1111112.1481299053903-1.14812990539026
1121213.355591340652-1.35559134065204
1131111.2954308584752-0.295430858475215
1141413.53668392966750.463316070332479
1151513.8628369397971.137163060203
1161613.76003394600422.23996605399575
1171613.18734390276792.81265609723212
1181112.1709906354501-1.17099063545013
1191413.75400526829910.245994731700887
1201410.44215141589583.55784858410424
1211211.97024356284990.0297564371500984
1221412.13399772024261.86600227975737
123810.4785602580696-2.4785602580696
1241313.649790443117-0.64979044311701
1251613.5197676592722.48023234072802
1261210.84132989423811.15867010576193
1271615.70287098641860.297129013581357
1281213.0722414848954-1.07224148489537
1291111.6781192901223-0.678119290122291
13046.37999791499802-2.37999791499802
1311616.4055838135-0.405583813500041
1321512.97862754322422.02137245677582
1331011.6249742701106-1.62497427011064
1341314.3936921020432-1.39369210204317
1351512.60708978461272.39291021538733
1361210.83546435988811.16453564011192
1371413.15550726639980.844492733600183
138710.8174625448135-3.81746254481347
1391914.21512419529974.78487580470031
1401213.2950453890767-1.2950453890767
1411211.43352286625370.566477133746267
1421312.82919111291520.170808887084805
1431512.72334463089862.27665536910138
14488.54741632547693-0.547416325476926
1451211.29180329721770.70819670278227
1461010.9933872664398-0.993387266439819
147810.6931421519633-2.69314215196329
1481014.2470397569821-4.2470397569821
1491513.37760859470231.62239140529766
1501614.21875175655721.78124824344282
1511313.5478309253338-0.547830925333838
1521615.35576893261150.644231067388492
153910.1340002208409-1.13400022084089
1541412.46214663479511.53785336520488
1551412.72747366380151.27252633619849
1561210.58267882363091.41732117636906


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.09622709467513610.1924541893502720.903772905324864
110.1585134225045860.3170268450091730.841486577495414
120.08487830753614890.1697566150722980.915121692463851
130.5472747978787230.9054504042425540.452725202121277
140.7313764721276160.5372470557447670.268623527872384
150.6614402361292140.6771195277415710.338559763870786
160.5710966529318590.8578066941362830.428903347068141
170.5257322087766570.9485355824466850.474267791223343
180.4568988077463630.9137976154927260.543101192253637
190.3717622630030010.7435245260060030.628237736996999
200.5805264526146370.8389470947707260.419473547385363
210.5307116839364780.9385766321270440.469288316063522
220.560714018831340.8785719623373210.43928598116866
230.4873293894521650.974658778904330.512670610547835
240.5204113204152810.9591773591694380.479588679584719
250.4725251859686240.9450503719372490.527474814031376
260.4278494886517260.8556989773034520.572150511348274
270.620453449905180.759093100189640.37954655009482
280.5543105354335920.8913789291328160.445689464566408
290.5055669276587830.9888661446824340.494433072341217
300.6087920359350910.7824159281298190.391207964064909
310.7098105086971530.5803789826056930.290189491302847
320.6617958820707290.6764082358585420.338204117929271
330.6093879966855090.7812240066289820.390612003314491
340.5590975393162490.8818049213675020.440902460683751
350.5767870948932560.8464258102134870.423212905106744
360.6173720865366790.7652558269266430.382627913463321
370.605821781298770.788356437402460.39417821870123
380.5554447448460820.8891105103078370.444555255153919
390.5008468670983650.998306265803270.499153132901635
400.4488925234759870.8977850469519730.551107476524013
410.4435432227244920.8870864454489840.556456777275508
420.7452599582502940.5094800834994130.254740041749706
430.9458272167567540.1083455664864930.0541727832432463
440.9438097455313330.1123805089373340.0561902544686671
450.9298563317723310.1402873364553390.0701436682276695
460.9490556312871920.1018887374256160.050944368712808
470.9428798270145440.1142403459709130.0571201729854563
480.9362906370425830.1274187259148350.0637093629574174
490.9416154487678850.1167691024642290.0583845512321145
500.9349397820914860.1301204358170280.0650602179085142
510.9329194106528010.1341611786943970.0670805893471987
520.989095203509510.02180959298097980.0109047964904899
530.9854091010418280.02918179791634450.0145908989581722
540.9879854423943070.02402911521138680.0120145576056934
550.9923760101617270.01524797967654520.00762398983827259
560.9908227007319650.01835459853606970.00917729926803487
570.9875069429134210.02498611417315770.0124930570865789
580.9846107188221330.0307785623557340.015389281177867
590.9886913557431580.02261728851368430.0113086442568422
600.9857986716426660.02840265671466830.0142013283573342
610.9845973798149710.03080524037005810.0154026201850291
620.9867490989344120.02650180213117690.0132509010655884
630.98350948536310.03298102927379960.0164905146368998
640.9850891890860.02982162182799870.0149108109139994
650.9852629433616360.02947411327672720.0147370566383636
660.982873460968490.0342530780630180.017126539031509
670.9818325672825670.03633486543486660.0181674327174333
680.9882698240719660.02346035185606790.011730175928034
690.9863751388623740.02724972227525190.013624861137626
700.9819323399423870.03613532011522550.0180676600576128
710.9803768157170040.03924636856599230.0196231842829962
720.9739465466520140.05210690669597130.0260534533479856
730.9676357294731370.06472854105372690.0323642705268634
740.9728110615064860.05437787698702890.0271889384935145
750.966759116515190.06648176696962050.0332408834848103
760.9646348960638970.07073020787220640.0353651039361032
770.9560482826601420.0879034346797160.043951717339858
780.9442490724639480.1115018550721040.0557509275360518
790.9576776236680740.08464475266385240.0423223763319262
800.9614091914121470.07718161717570630.0385908085878532
810.9629852540425660.07402949191486760.0370147459574338
820.960459916155340.07908016768932110.0395400838446606
830.9494625138126650.101074972374670.0505374861873351
840.9426383318857430.1147233362285150.0573616681142574
850.98360022462630.03279955074739960.0163997753736998
860.978328943488990.04334211302202020.0216710565110101
870.9716852503579340.05662949928413150.0283147496420657
880.9640988068304940.07180238633901190.035901193169506
890.9555665063553470.08886698728930660.0444334936446533
900.9438416904834640.1123166190330730.0561583095165364
910.9325784715248690.1348430569502620.067421528475131
920.9667499597303950.06650008053921070.0332500402696053
930.9570522840285880.08589543194282320.0429477159714116
940.9487253966005320.1025492067989360.0512746033994682
950.9395770010851030.1208459978297930.0604229989148967
960.9241256477213380.1517487045573240.0758743522786622
970.920637624433190.1587247511336190.0793623755668096
980.901631338847640.196737322304720.09836866115236
990.8858075110395030.2283849779209950.114192488960497
1000.8599485530643290.2801028938713420.140051446935671
1010.831882152661480.336235694677040.16811784733852
1020.801049578154260.3979008436914810.19895042184574
1030.8034776044969270.3930447910061470.196522395503073
1040.8493919004442860.3012161991114280.150608099555714
1050.8441054458136260.3117891083727480.155894554186374
1060.8162220728735680.3675558542528650.183777927126432
1070.7970732093470.4058535813060020.202926790653001
1080.7993300847312440.4013398305375110.200669915268756
1090.805278498765420.3894430024691590.19472150123458
1100.8370459640180440.3259080719639120.162954035981956
1110.8267355922729830.3465288154540340.173264407727017
1120.8817590034506850.2364819930986290.118240996549314
1130.8519389132860240.2961221734279520.148061086713976
1140.820296640011680.359406719976640.17970335998832
1150.7867585635807330.4264828728385330.213241436419267
1160.773620917513750.4527581649724980.226379082486249
1170.7779395078227610.4441209843544780.222060492177239
1180.7484505416156140.5030989167687720.251549458384386
1190.6991051836905610.6017896326188780.300894816309439
1200.799337439046950.4013251219061020.200662560953051
1210.7587796702694080.4824406594611850.241220329730593
1220.7368272366283510.5263455267432970.263172763371649
1230.7180184071675820.5639631856648370.281981592832418
1240.6663466777100720.6673066445798560.333653322289928
1250.6816483920053280.6367032159893440.318351607994672
1260.6657505823474910.6684988353050180.334249417652509
1270.6095227347272580.7809545305454830.390477265272742
1280.6050457058851280.7899085882297440.394954294114872
1290.6227442737388770.7545114525222470.377255726261123
1300.6649471015627550.6701057968744890.335052898437245
1310.6111144094466370.7777711811067260.388885590553363
1320.5664658704783680.8670682590432640.433534129521632
1330.5253302577762330.9493394844475330.474669742223767
1340.4531438461183630.9062876922367260.546856153881637
1350.4784945621696080.9569891243392170.521505437830392
1360.4569531221477260.9139062442954530.543046877852274
1370.3754011865319260.7508023730638520.624598813468074
1380.5950486003822580.8099027992354850.404951399617742
1390.819178904743130.361642190513740.18082109525687
1400.9321272246048270.1357455507903460.0678727753951728
1410.8879376935647840.2241246128704330.112062306435216
1420.8256632053071970.3486735893856060.174336794692803
1430.7889884342949270.4220231314101450.211011565705073
1440.6744167813619190.6511664372761630.325583218638081
1450.5861041215874040.8277917568251920.413895878412596
1460.6707045864987160.6585908270025680.329295413501284


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level220.160583941605839NOK
10% type I error level370.27007299270073NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/10gj0w1292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/10gj0w1292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/1ril21292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/1ril21292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/2ril21292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/2ril21292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/3j9kn1292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/3j9kn1292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/4j9kn1292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/4j9kn1292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/5j9kn1292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/5j9kn1292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/6ui181292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/6ui181292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/7n90t1292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/7n90t1292092021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/8n90t1292092021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091956ucirci2hgxibtuz/8n90t1292092021.ps (open in new window)


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