Home » date » 2010 » Nov » 22 »

WS7

*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: Mon, 22 Nov 2010 19:33:23 +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/22/t1290454742cv9f4o6pnkdkfb0.htm/, Retrieved Mon, 22 Nov 2010 20:39:14 +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/22/t1290454742cv9f4o6pnkdkfb0.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 «
14 1 12 53 32 3 3 18 4 11 86 51 3 3 11 1 14 66 42 4 4 12 2 12 67 41 3 3 16 3 21 76 46 3 2 18 2 12 78 47 3 3 14 2 22 53 37 3 4 14 1 11 80 49 2 2 15 2 10 74 45 3 3 15 1 13 76 47 3 4 17 2 10 79 49 3 3 19 2 8 54 33 3 3 10 2 15 67 42 3 4 16 2 14 54 33 2 2 18 1 10 87 53 3 2 14 2 14 58 36 3 3 14 4 14 75 45 2 2 17 2 11 88 54 3 4 14 2 10 64 41 2 2 16 2 13 57 36 1 1 18 1 7 66 41 2 3 11 1 14 68 44 3 4 14 2 12 54 33 3 2 12 2 14 56 37 3 3 17 2 11 86 52 3 3 9 2 9 80 47 3 4 16 1 11 76 43 2 3 14 3 15 69 44 3 3 15 2 14 78 45 3 4 11 2 13 67 44 4 4 16 4 9 80 49 3 4 13 3 15 54 33 3 3 17 1 10 71 43 3 4 15 1 11 84 54 3 3 14 2 13 74 42 2 2 16 2 8 71 44 3 4 9 1 20 63 37 3 3 15 1 12 71 43 3 2 17 3 10 76 46 3 4 13 2 10 69 42 4 4 15 2 9 74 45 3 4 16 3 14 75 44 3 4 16 1 8 54 33 1 2 12 1 14 52 31 2 2 12 1 11 69 42 3 3 11 3 13 68 40 4 4 15 3 9 65 43 4 5 15 2 11 75 46 2 2 17 2 15 74 42 1 3 13 1 11 75 45 3 3 16 2 10 72 44 3 2 14 2 14 67 40 1 2 11 1 18 63 37 3 3 12 2 14 62 46 2 2 12 1 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 time15 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
happiness[t] = + 16.8047526382411 + 0.312091001977892luck[t] -0.357308069520522depression[t] + 0.0686057180561021belonging[t] -0.0592332381375093belonging_final[t] -0.352905082725952popularity[t] -0.0280289123784063friends[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.80475263824111.61689910.393200
luck0.3120910019778920.1820791.7140.0886880.044344
depression-0.3573080695205220.053825-6.638300
belonging0.06860571805610210.0476961.43840.1525090.076255
belonging_final-0.05923323813750930.068828-0.86060.3909030.195452
popularity-0.3529050827259520.263224-1.34070.1821430.091072
friends-0.02802891237840630.232349-0.12060.9041510.452076


Multiple Linear Regression - Regression Statistics
Multiple R0.581195686546521
R-squared0.337788426060282
Adjusted R-squared0.310003325055818
F-TEST (value)12.1571782663671
F-TEST (DF numerator)6
F-TEST (DF denominator)143
p-value5.10060882419339e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.93458580398152
Sum Squared Residuals535.194979314254


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11413.42698425723300.573015742767027
21815.85912250392572.14087749607433
31112.6309760764416-1.63097607644163
41214.1664561687585-2.16645616875852
51611.61208872924754.3879112707525
61814.56571963855063.43428036144941
7149.841799460939524.15820053906048
81415.0106156610348-1.01061566103476
91515.1243793816422-0.124379381642241
101513.73108021856161.26891978143843
111715.23047501937271.76952498062729
121915.17768001721143.82231998278865
131013.0072698096810-3.00726980968104
141613.41476559519262.58523440480742
151815.2583257216722.74167427832799
161413.13055475790010.869445242099893
171414.7688688206764-0.768868820676399
181715.16642330929121.83357669070884
191415.0561891487356-1.05618914873562
201614.18112509957321.81887490042676
211815.92520487905312.07479512094691
221113.0026261190048-2.00262611900476
231413.77647665150770.223523348492326
241212.9341100836504-0.934110083650394
251715.17570726183241.82429273816762
26915.7468263708459-6.74682637084595
271615.0635633052570.936436694742997
281413.36613468387450.633865316125474
291513.94154106340621.05845893659384
301113.2505143897211-2.25051438972111
311616.2525418985267-0.252541898526714
321312.98861453254560.0113854674544035
331714.69690878939272.30309121060734
341514.60793834746730.392061652532734
351414.6110888825976-0.611088882597563
361615.66438269227410.335617307725919
37910.9584106909421-1.95841069094209
381514.03835047510840.961649524891574
391715.48641966921641.51358033078358
401314.5781165106699-1.5781165106699
411515.4536585387844-0.453658538784356
421614.10704814935331.89295185064675
431615.59942809306380.400571906936228
441213.0839296333775-1.08392963337751
451214.2896514342758-2.28965143427585
461113.8681440623051-2.86814406230514
471514.8858305594280.114169440572010
481515.1573777871447-0.157377787144671
491714.22134891390412.77865108609593
501314.5235860281999-1.52358602819993
511615.07443009604600.925569903954048
521414.2449123456853-0.244912345685298
531111.6730268299831-0.673026829983132
541213.1935792438538-1.19357924385378
551214.2053876423859-2.20538764238588
561514.74059920441630.259400795583724
571614.40536025580661.59463974419337
581514.79821314407820.201786855921782
591215.6240171280920-3.62401712809198
601213.1538537257118-1.15385372571184
61810.9494536961730-2.94945369617297
621314.2346464016651-1.23464640166515
631114.2754604824132-3.27546048241321
641412.32206164316881.67793835683121
651513.41916858198721.58083141801285
661015.5379257594857-5.53792575948567
671111.9680147753628-0.96801477536282
681214.5500615647167-2.55006156471673
691513.99648703102561.00351296897439
701514.29168621790090.70831378209911
711414.2276014764028-0.227601476402849
721612.96058562016723.03941437983281
731514.04290448308300.957095516917027
741515.1183310627973-0.118331062797338
751315.7811443059510-2.78114430595098
761212.0833081117441-0.0833081117441266
771713.89649877713133.10350122286871
781312.38024162360370.619758376396347
791514.11177693859560.88822306140444
801315.2293348551736-2.22933485517360
811515.4037717469907-0.403771746990673
821615.05528559296110.94471440703885
831515.9000523009502-0.900052300950239
841614.81252908354611.18747091645393
851514.65666121497410.34333878502595
861414.1398058509740-0.139805850973965
871514.81408588821900.185914111780971
881413.93234336475530.067656635244675
891312.29558953546330.704410464536653
90710.7215402321947-3.72154023219466
911714.52076930846442.47923069153556
921313.3415196152715-0.341519615271548
931513.81810509400711.18189490599288
941413.68095615169750.319043848302482
951315.7296382156817-2.72963821568173
961615.08826805656170.91173194343828
971212.8120266752704-0.812026675270434
981415.6752859432909-1.67528594329087
991715.09764053648031.90235946351969
1001514.53736149491310.462638505086907
1011714.88065682265012.11934317734991
1021212.2189002493808-0.218900249380763
1031614.74979347425581.25020652574424
1041114.0838342801075-3.08383428010754
1051513.96696106873331.03303893126668
106911.3810003174450-2.38100031744502
1071616.4278994433445-0.427899443344484
1081512.55306037226952.44693962773047
1091013.3695485276500-3.36954852764995
110109.470538869951080.529461130048915
1111514.31915089743680.680849102563173
1121113.3970722721771-2.39707227217714
1131315.488124066258-2.48812406625801
1141412.54184336633901.45815663366102
1151814.40047929006003.59952070994002
1161615.40493910008890.595060899911075
1171412.96498860696181.03501139303824
1181414.1773854533501-0.177385453350076
1191415.6284495772727-1.62844957727267
1201413.81516922918380.18483077081623
1211212.9886145325456-0.988614532545597
1221414.0571873911343-0.0571873911343368
1231515.9968970175560-0.996897017555977
1241516.1826166508680-1.18261665086802
1251514.00544059698340.99455940301663
1261314.9916334261272-1.99163342612721
1271715.65132963112361.34867036887643
1281715.49570362175761.50429637824236
1291915.12635051614033.87364948385969
1301514.73634496531470.263655034685301
1311314.0459288752837-1.04592887528369
132911.2705902202974-2.27059022029735
1331514.98690120807360.0130987919264474
1341512.70446276024442.29553723975563
1351513.96959600935931.03040399064067
1361613.77012694290892.2298730570911
137119.790030062025131.20996993797487
1381413.85202299718590.147977002814128
1391111.4796950753115-0.479695075311511
1401514.41799440299630.582005597003694
1411314.3164527732404-1.31645277324038
1421514.15097287619240.84902712380758
1431614.62195794687351.37804205312650
1441415.1400999492787-1.14009994927871
1451514.24425615665410.755743843345896
1461615.20382470158820.796175298411842
1471614.80944219754271.19055780245726
1481113.4657937065098-2.46579370650975
1491214.4363238776840-2.43632387768402
150911.7119248066375-2.71192480663747


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.7079265707037740.5841468585924530.292073429296226
110.7914220929547320.4171558140905350.208577907045268
120.904551812129910.1908963757401800.0954481878700898
130.9788219017914240.04235619641715210.0211780982085761
140.9652657025761310.06946859484773730.0347342974238686
150.9586890063280040.0826219873439910.0413109936719955
160.9390390956813760.1219218086372480.0609609043186238
170.9624555156837580.07508896863248360.0375444843162418
180.9646977113490970.07060457730180650.0353022886509033
190.9610330265207480.07793394695850350.0389669734792517
200.9490697353651280.1018605292697440.050930264634872
210.9544759547937580.0910480904124830.0455240452062415
220.9572771065643970.08544578687120650.0427228934356032
230.9464155505010730.1071688989978540.053584449498927
240.9343497433978460.1313005132043080.065650256602154
250.9167402408247110.1665195183505780.083259759175289
260.996625774718590.006748450562818470.00337422528140924
270.995707445511430.008585108977141740.00429255448857087
280.9935313219326170.01293735613476620.0064686780673831
290.9912647756243840.01747044875123150.00873522437561573
300.9910339850176160.01793202996476730.00896601498238367
310.987622997267320.02475400546536180.0123770027326809
320.982537537067720.03492492586456020.0174624629322801
330.9864902514725230.02701949705495360.0135097485274768
340.9806926882642380.03861462347152480.0193073117357624
350.9797729483333380.04045410333332450.0202270516666623
360.973734855058190.0525302898836220.026265144941811
370.97896950849540.04206098300920190.0210304915046010
380.9720870702347640.05582585953047280.0279129297652364
390.9686190342631540.06276193147369170.0313809657368459
400.9622423630338130.07551527393237490.0377576369661874
410.949943248191250.1001135036174990.0500567518087494
420.9479483090747290.1041033818505430.0520516909252713
430.9324492735082440.1351014529835120.067550726491756
440.923208287628420.1535834247431620.0767917123715808
450.9283160093118690.1433679813762630.0716839906881313
460.938336899853290.1233262002934220.061663100146711
470.922418582811940.1551628343761200.0775814171880598
480.908324311263850.1833513774723010.0916756887361503
490.9155551436346960.1688897127306080.084444856365304
500.9054373222867310.1891253554265370.0945626777132687
510.886622077038620.226755845922760.11337792296138
520.8753264339605140.2493471320789730.124673566039486
530.8494325651231340.3011348697537320.150567434876866
540.8568272372696730.2863455254606540.143172762730327
550.8561991769613890.2876016460772220.143800823038611
560.8272515069985280.3454969860029440.172748493001472
570.810067310198310.3798653796033810.189932689801691
580.780251151640220.4394976967195610.219748848359781
590.874216557388530.2515668852229410.125783442611470
600.8583540285115470.2832919429769060.141645971488453
610.889976243758960.2200475124820790.110023756241040
620.8732656154221210.2534687691557580.126734384577879
630.909617188731410.1807656225371810.0903828112685906
640.9140115450045250.1719769099909490.0859884549954746
650.9066619353506210.1866761292987580.093338064649379
660.9874952846370220.02500943072595610.0125047153629781
670.9843648683650970.03127026326980520.0156351316349026
680.9876570634279060.02468587314418690.0123429365720935
690.9844644065436150.03107118691277090.0155355934563854
700.980688472707150.03862305458569900.0193115272928495
710.9744961794625990.05100764107480290.0255038205374014
720.9836389763878310.03272204722433760.0163610236121688
730.9796093287973640.04078134240527310.0203906712026366
740.9731351304177120.05372973916457630.0268648695822882
750.9810154885088560.03796902298228740.0189845114911437
760.9746052669155660.05078946616886840.0253947330844342
770.9846467704956680.03070645900866440.0153532295043322
780.9800955706332060.03980885873358820.0199044293667941
790.9747550807045550.050489838590890.025244919295445
800.9756727857954740.0486544284090520.024327214204526
810.9683811561649950.06323768767000960.0316188438350048
820.961014324517710.07797135096457950.0389856754822897
830.9523212066592460.09535758668150870.0476787933407543
840.9438520626038420.1122958747923170.0561479373961585
850.9285742846505770.1428514306988460.0714257153494229
860.9100393143805720.1799213712388550.0899606856194277
870.8891105813736190.2217788372527620.110889418626381
880.8636875024235360.2726249951529270.136312497576464
890.8386247882462270.3227504235075450.161375211753773
900.9075056163938450.184988767212310.092494383606155
910.925038945587850.1499221088243010.0749610544121505
920.90686826335220.1862634732956000.0931317366477998
930.8921646578947820.2156706842104350.107835342105218
940.8669493544163580.2661012911672840.133050645583642
950.8915150828115120.2169698343769760.108484917188488
960.8712651707284410.2574696585431180.128734829271559
970.8452606804769150.3094786390461700.154739319523085
980.835907450268630.3281850994627390.164092549731370
990.8347777606680840.3304444786638320.165222239331916
1000.8016236540349060.3967526919301880.198376345965094
1010.8078738478932130.3842523042135730.192126152106786
1020.7703929579986260.4592140840027480.229607042001374
1030.7444842605900670.5110314788198650.255515739409933
1040.8122784875814780.3754430248370450.187721512418522
1050.7898123238379310.4203753523241370.210187676162069
1060.8029292797478150.394141440504370.197070720252185
1070.7662082035082120.4675835929835760.233791796491788
1080.7774992568911510.4450014862176970.222500743108849
1090.8426494693497470.3147010613005060.157350530650253
1100.810028614923740.379942770152520.18997138507626
1110.7773354551499410.4453290897001180.222664544850059
1120.798485498500530.4030290029989410.201514501499470
1130.836489106088060.3270217878238800.163510893911940
1140.8927270673029010.2145458653941970.107272932697099
1150.9498293849602950.1003412300794110.0501706150397054
1160.9320214343206040.1359571313587920.0679785656793958
1170.9332450943726290.1335098112547420.0667549056273708
1180.9100352953779940.1799294092440110.0899647046220055
1190.8942173291399940.2115653417200130.105782670860007
1200.8599529063025090.2800941873949820.140047093697491
1210.82058163444870.3588367311026010.179418365551300
1220.7767793728581750.4464412542836490.223220627141825
1230.7483709721362590.5032580557274820.251629027863741
1240.7304767726054160.5390464547891680.269523227394584
1250.6800878316264530.6398243367470930.319912168373547
1260.679162027378230.641675945243540.32083797262177
1270.6218882006212450.756223598757510.378111799378755
1280.6231016237701750.753796752459650.376898376229825
1290.7032656727361420.5934686545277170.296734327263858
1300.630204814432140.7395903711357210.369795185567861
1310.5541074851101720.8917850297796560.445892514889828
1320.5812361532743660.8375276934512680.418763846725634
1330.4974234957603650.9948469915207310.502576504239635
1340.4921218789379460.9842437578758930.507878121062054
1350.4590996763468350.918199352693670.540900323653165
1360.572108844738930.855782310522140.42789115526107
1370.5221199011694340.9557601976611330.477880098830566
1380.3933743547180990.7867487094361980.606625645281901
1390.4500204312739690.9000408625479380.549979568726031
1400.4370075200431810.8740150400863620.562992479956819


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level20.0152671755725191NOK
5% type I error level230.175572519083969NOK
10% type I error level410.312977099236641NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/105e0o1290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/105e0o1290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/1yv3u1290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/1yv3u1290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/2yv3u1290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/2yv3u1290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/39mlx1290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/39mlx1290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/49mlx1290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/49mlx1290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/59mlx1290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/59mlx1290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/61v201290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/61v201290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/7u5j31290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/7u5j31290454385.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/8u5j31290454385.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290454742cv9f4o6pnkdkfb0/8u5j31290454385.ps (open in new window)


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