Home » date » 2010 » Nov » 21 »

workshop 7

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 21 Nov 2010 17:50:24 +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/21/t1290362653dl98v8ep6tt1mv2.htm/, Retrieved Sun, 21 Nov 2010 19:04:24 +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/21/t1290362653dl98v8ep6tt1mv2.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 10 15 12 16 6 9 12 7 12 6 10 10 10 11 5 12 12 7 12 3 13 15 16 18 8 12 9 11 11 4 12 12 14 14 4 6 11 6 9 4 5 11 16 14 6 12 11 11 12 6 11 15 16 11 5 14 7 12 12 4 14 11 7 13 6 12 11 13 11 4 12 10 11 12 6 11 14 15 16 6 11 10 7 9 4 7 6 9 11 4 9 11 7 13 2 11 15 14 15 7 11 11 15 10 5 12 12 7 11 4 12 14 15 13 6 11 15 17 16 6 11 9 15 15 7 8 13 14 14 5 9 13 14 14 6 12 16 8 14 4 10 13 8 8 4 10 12 14 13 7 12 14 14 15 7 8 11 8 13 4 12 9 11 11 4 11 16 16 15 6 12 12 10 15 6 7 10 8 9 5 11 13 14 13 6 11 16 16 16 7 12 14 13 13 6 9 15 5 11 3 15 5 8 12 3 11 8 10 12 4 11 11 8 12 6 11 16 13 14 7 11 17 15 14 5 15 9 6 8 4 11 9 12 13 5 12 13 16 16 6 12 10 5 13 6 9 6 15 11 6 12 12 12 14 5 12 8 8 13 4 13 14 13 13 5 11 12 14 13 5 9 11 12 12 4 9 16 16 16 6 11 8 10 15 2 11 15 15 15 8 12 7 8 12 3 12 16 16 14 6 9 14 19 12 6 11 16 14 15 6 9 9 6 12 5 12 14 13 13 5 12 11 15 12 6 12 13 7 12 5 12 15 13 13 6 14 5 4 5 2 11 15 14 13 5 12 13 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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
KnowingPeople[t] = + 0.725680871464287 -0.0675593352860248FindingFriends[t] + 0.387096838191507Popularity[t] + 0.27399933524668Liked[t] + 0.670538732124844`Celebrity `[t] -0.00187723512719696t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.7256808714642871.8032420.40240.687940.34397
FindingFriends-0.06755933528602480.122209-0.55280.5812120.290606
Popularity0.3870968381915070.0980043.94980.000126e-05
Liked0.273999335246680.1264032.16770.0317620.015881
`Celebrity `0.6705387321248440.2004073.34590.0010370.000518
t-0.001877235127196960.004821-0.38940.6975250.348762


Multiple Linear Regression - Regression Statistics
Multiple R0.653361596228413
R-squared0.426881375426139
Adjusted R-squared0.407777421273677
F-TEST (value)22.3451842492579
F-TEST (DF numerator)5
F-TEST (DF denominator)150
p-value1.11022302462516e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.66394071596264
Sum Squared Residuals1064.48702072453


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11410.45139872868973.54860127131033
2811.4710614549067-3.47106145490674
31214.2581301427910-2.25813014279098
4712.0665243873886-5.06652438738857
51010.2783560732208-0.278356073220814
679.84847571490158-2.84847571490158
71615.93701933116720.0629806688328206
8119.079970126950831.92002987304917
91411.06138141213822.93861858786181
1069.70776667430223-3.70776667430223
111612.48452291494423.51547708505585
121111.4617316623214-0.461731662321422
131612.13126304787483.86873695212525
14128.433393704479263.56660629552074
15711.5949806216145-4.59498062161446
16139.839145922316273.16085407768373
171111.0652486484939-0.0652486484939305
181513.77531544240551.22468455759449
1978.96597804353583-1.96597804353583
2098.233949467280070.766050532719934
2179.23935895878203-2.23935895878203
221414.5514427369664-0.551442736966389
231510.29010400859014.70989599140993
24710.2112248794902-3.2112248794902
251512.87261745548912.12738254451094
261714.14739439957942.85260560042056
271512.21947553218142.78052446781864
281412.35358685618191.6464131438181
291412.95468901789351.04531098210648
30812.5703468272331-4.57034682723309
3189.89830173662333-1.89830173662333
321412.89094053591261.10905946408744
331414.0761369770897-0.0761369770896918
34810.6235917016642-2.62359170166418
35119.02928477851651.97071522148349
361614.24171955125231.75828044874770
371012.6238956280730-2.62389562807305
3889.87108664938803-1.87108664938803
391412.52679866080281.47320133919718
401615.17874867811500.821251321884969
411312.84258169345390.157418306546089
42510.8708644355084-5.8708644355084
4386.866662141996671.13333785800333
44108.966851494712941.03314850528706
45811.4673422384099-3.46734223840995
461314.6194865968585-1.61948659685849
471513.66362873567311.33637126432689
4867.98020471026484-1.98020471026484
491210.28910022464001.71089977536002
501613.26058774485772.73941225514233
51511.2754219894159-6.27542198941592
52159.37983673688745.6201632631126
531211.64932179866640.350678201333629
5489.15451914340162-1.15451914340162
551312.07820233426230.921797665737714
561411.43725009332412.56274990667588
571210.23885662320591.76114337679405
581614.60953838427271.39046161572731
59108.419613509295331.58038649070466
601515.1506465342577-0.150646534257749
6187.809743591948210.190256408051787
621613.85135276741252.14864723258753
631912.72996119126706.27003880873303
641414.1891569676908-0.189156967690781
65610.1201837979302-4.1201837979302
661312.12511208314910.874887916850856
671511.35848373032563.64151626967441
68711.4602614394566-4.46026143945656
691313.1771159480839-0.177115948083903
7044.29500204999677-0.295002049996772
711412.57038208099071.42961791900931
721311.72675183419451.27324816580554
731111.2922395932169-0.292239593216950
741413.12069577238480.87930422761524
751212.1396806933183-0.139680693318250
761512.0026847876192.99731521238100
771410.98871014983433.01128985016574
781311.59862892638391.40137107361614
79811.7041686296174-3.70416862961742
8066.44244121896844-0.44244121896844
8178.44273762152912-1.44273762152912
821312.89697172970830.103028270291697
831313.6532951591377-0.653295159137705
841110.40405383341890.59594616658106
85510.0872709780445-5.08727097804453
861211.64235376581430.35764623418567
8788.72522855194161-0.725228551941614
881112.1954145808913-1.19541458089128
891415.4833035537605-1.48330355376054
9099.65469235524489-0.65469235524489
911013.6382772781201-3.63827727812013
921311.81401335498021.18598664501978
931615.01169588108760.988304118912432
941613.26530374047602.73469625952397
951111.0900385881168-0.0900385881167627
9689.301870273949-1.30187027394900
97410.7526721736120-6.75267217361196
9877.51182472465405-0.511824724654047
991411.72010882101462.27989117898542
1001112.3447279827578-1.34472798275778
1011715.06423733535601.93576266464398
1021514.72080142969610.279198570303885
1031713.96107112122913.03892887877095
10459.6865278400635-4.6865278400635
10545.48243599973087-1.48243599973087
1061014.8160775448898-4.81607754488981
107118.906702458298892.09329754170110
1081514.67344240996080.326557590039212
109108.789850485099681.21014951490032
11099.93518932320208-0.935189323202077
1111211.28846399366950.71153600633051
1121512.87588039630892.12411960369114
113711.5461302497212-4.54613024972121
1141313.2535421996619-0.253542199661895
1151214.5832998700977-2.58329987009773
1161413.81754140582990.182458594170141
1171413.74810483541660.251895164583363
118812.3587420798253-4.35874207982527
1191512.97015668877922.02984331122077
1201211.1467626541950.85323734580499
1211210.57713174264551.42286825735455
1221611.81354691606554.18645308393454
12398.818549919664380.181450080335623
1241512.50611433966572.49388566033429
1251513.73308695439911.26691304560094
126611.512283634381-5.512283634381
1271415.6184086188877-1.61840861888772
1281511.90506856100483.09493143899524
1291011.389792431952-1.38979243195199
13065.26770524489260.732294755107398
1311415.6108996783789-1.61089967837893
1321213.1264094703565-1.12640947035652
133810.6024092504761-2.60240925047612
1341112.7613413236404-1.76134132364042
1351313.3272177649356-0.327217764935585
136910.5489732157375-1.5489732157375
1371513.00392579177571.99607420822429
138137.665196487154055.33480351284595
1391515.1420955124395-0.142095512439505
1401411.62112101317232.37887898682771
1411610.60714637538755.39285362461246
1421412.53988344266221.46011655733781
1431412.51912109016171.48087890983832
144107.202691305799182.79730869420082
1451010.5320780995927-0.532078099592727
146411.0295253170462-7.02952531704618
14789.92447434394383-1.92447434394383
1481511.43865084671313.5613491532869
1491613.36849580844092.63150419155915
1501215.3012328757155-3.30123287571551
1511212.9870870586816-0.987087058681607
1521514.90093900858290.099060991417052
15399.14932970403997-0.149329704039975
1541213.3135714651461-1.31357146514607
1551412.42213688899281.57786311100720
156119.511909719476581.48809028052342


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.6729937495750810.6540125008498370.327006250424919
100.6424956550479360.7150086899041290.357504344952064
110.508496084242660.983007831514680.49150391575734
120.4289002789919590.8578005579839180.571099721008041
130.775398321535920.4492033569281590.224601678464079
140.7115979448382650.5768041103234690.288402055161735
150.909063239877340.1818735202453190.0909367601226594
160.8738435652011180.2523128695977640.126156434798882
170.8240576627318020.3518846745363970.175942337268198
180.8105644210139170.3788711579721650.189435578986083
190.8079249986708450.384150002658310.192075001329155
200.772750701215810.4544985975683810.227249298784190
210.8926919662149020.2146160675701960.107308033785098
220.8560851099326380.2878297801347230.143914890067362
230.9039594193991310.1920811612017380.096040580600869
240.9275997543610270.1448004912779450.0724002456389724
250.9115490143147160.1769019713705670.0884509856852835
260.8945058254547540.2109883490904920.105494174545246
270.8712487312519110.2575025374961770.128751268748088
280.8372298871877490.3255402256245020.162770112812251
290.7975038097428950.404992380514210.202496190257105
300.8863549147467920.2272901705064160.113645085253208
310.861978219695750.2760435606085010.138021780304251
320.8279023867875470.3441952264249050.172097613212453
330.7923348963300180.4153302073399630.207665103669982
340.8037969138011740.3924061723976530.196203086198826
350.7706032459234230.4587935081531540.229396754076577
360.7416520321802470.5166959356395050.258347967819753
370.7721714000004520.4556571999990960.227828599999548
380.7448095901314990.5103808197370020.255190409868501
390.7086819630795240.5826360738409520.291318036920476
400.6619486744423020.6761026511153970.338051325557699
410.6102281422743410.7795437154513190.389771857725659
420.7338434905463860.5323130189072270.266156509453614
430.6993090095870140.6013819808259720.300690990412986
440.6547605518126960.6904788963746080.345239448187304
450.6927268852682720.6145462294634560.307273114731728
460.6567761115493870.6864477769012260.343223888450613
470.6436087558173730.7127824883652530.356391244182627
480.6136708557547040.7726582884905920.386329144245296
490.5778938773207810.8442122453584390.422106122679219
500.5673142686556290.8653714626887420.432685731344371
510.7823615236650340.4352769526699330.217638476334966
520.8807978701017720.2384042597964560.119202129898228
530.8544386199484920.2911227601030170.145561380051508
540.8347145121049770.3305709757900460.165285487895023
550.8109903839231160.3780192321537670.189009616076884
560.8084706480055430.3830587039889140.191529351994457
570.7874851091284710.4250297817430580.212514890871529
580.7569173489869210.4861653020261570.243082651013079
590.728652606348770.542694787302460.27134739365123
600.6887175550377580.6225648899244840.311282444962242
610.6488965629620730.7022068740758550.351103437037927
620.6356458282426560.7287083435146880.364354171757344
630.8070194117786250.3859611764427490.192980588221375
640.774291209121670.451417581756660.22570879087833
650.831428350040050.33714329991990.16857164995995
660.8026027451479450.394794509704110.197397254852055
670.8324677166342080.3350645667315840.167532283365792
680.8814614405535340.2370771188929320.118538559446466
690.8563278746926530.2873442506146940.143672125307347
700.8297317776907640.3405364446184720.170268222309236
710.805518609228030.3889627815439390.194481390771970
720.778343174736870.4433136505262610.221656825263130
730.7466574991363320.5066850017273370.253342500863668
740.7268403518195170.5463192963609670.273159648180483
750.6889990984709060.6220018030581870.311000901529093
760.7080060397757240.5839879204485520.291993960224276
770.7259680852698860.5480638294602290.274031914730114
780.6996153744320040.6007692511359920.300384625567996
790.7414910677418140.5170178645163720.258508932258186
800.703834887912490.5923302241750210.296165112087511
810.6771062889007810.6457874221984380.322893711099219
820.6334693136281380.7330613727437240.366530686371862
830.5959250270951570.8081499458096860.404074972904843
840.558110608287760.883778783424480.44188939171224
850.7074072202285970.5851855595428060.292592779771403
860.6685501567530920.6628996864938160.331449843246908
870.6276094390721750.744781121855650.372390560927825
880.5897286017918030.8205427964163950.410271398208197
890.5577971339170570.8844057321658860.442202866082943
900.5129863330748710.9740273338502580.487013666925129
910.54742422561970.90515154876060.4525757743803
920.5390245091951570.9219509816096870.460975490804843
930.5039530088167590.9920939823664820.496046991183241
940.5070700887924870.9858598224150270.492929911207513
950.4585867371293050.917173474258610.541413262870695
960.4237665889373720.8475331778747440.576233411062628
970.6235438467588560.7529123064822880.376456153241144
980.5809058401503390.8381883196993230.419094159849661
990.5818867706024180.8362264587951640.418113229397582
1000.543945241728950.91210951654210.45605475827105
1010.5347129002782240.9305741994435530.465287099721776
1020.4880754916493750.976150983298750.511924508350625
1030.5715825898046180.8568348203907640.428417410195382
1040.7178603955484970.5642792089030070.282139604451503
1050.7050685885750370.5898628228499260.294931411424963
1060.748153711800750.5036925763985020.251846288199251
1070.7244146591050420.5511706817899170.275585340894958
1080.7038109042316390.5923781915367220.296189095768361
1090.6669825754105070.6660348491789860.333017424589493
1100.6186659955203910.7626680089592170.381334004479608
1110.5769970701544090.8460058596911810.423002929845591
1120.6337926872417860.7324146255164280.366207312758214
1130.6921354602211240.6157290795577530.307864539778876
1140.6430668969261940.7138662061476120.356933103073806
1150.608406039046130.783187921907740.39159396095387
1160.5555082043603590.8889835912792830.444491795639641
1170.502563296519680.994873406960640.49743670348032
1180.5222558469509640.9554883060980710.477744153049036
1190.4983848655333840.9967697310667670.501615134466616
1200.4610544725420740.9221089450841470.538945527457926
1210.4110359873098520.8220719746197040.588964012690148
1220.4388687488593650.8777374977187310.561131251140635
1230.3808389496985850.7616778993971690.619161050301415
1240.3842359317151240.7684718634302490.615764068284876
1250.339713312088710.679426624177420.66028668791129
1260.5349922167725010.9300155664549980.465007783227499
1270.4750546059494010.9501092118988020.524945394050599
1280.5166955812491970.9666088375016070.483304418750803
1290.4553800649483020.9107601298966040.544619935051698
1300.3996884268403680.7993768536807350.600311573159632
1310.3403609041177790.6807218082355580.659639095882221
1320.2953249895339310.5906499790678620.704675010466069
1330.3137728463527290.6275456927054570.686227153647271
1340.2782415258638580.5564830517277170.721758474136142
1350.2282789514617750.456557902923550.771721048538225
1360.2987177162799230.5974354325598470.701282283720077
1370.239709071401850.47941814280370.76029092859815
1380.2570508820208550.514101764041710.742949117979145
1390.2547863319828260.5095726639656520.745213668017174
1400.2112340439008980.4224680878017960.788765956099102
1410.2952770237952570.5905540475905140.704722976204743
1420.2642379389116510.5284758778233010.73576206108835
1430.2007501986634410.4015003973268830.799249801336559
1440.2167330515590740.4334661031181480.783266948440926
1450.1414985464579490.2829970929158980.858501453542051
1460.660013931173890.679972137652220.33998606882611
1470.5452941360727530.9094117278544930.454705863927247


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/103nmz1290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/103nmz1290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/1w47n1290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/1w47n1290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/27ep81290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/27ep81290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/37ep81290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/37ep81290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/47ep81290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/47ep81290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/5hnob1290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/5hnob1290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/6hnob1290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/6hnob1290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/7senw1290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/7senw1290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/8senw1290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/8senw1290361813.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/93nmz1290361813.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290362653dl98v8ep6tt1mv2/93nmz1290361813.ps (open in new window)


 
Parameters (Session):
par1 = 3 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 3 ; par2 = Do not include Seasonal Dummies ; par3 = 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