Home » date » 2010 » Nov » 25 »

W7-interactie_gender

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 25 Nov 2010 13:07:11 +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/25/t12906904275vrzsuj1kfex7td.htm/, Retrieved Thu, 25 Nov 2010 14:07:21 +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/25/t12906904275vrzsuj1kfex7td.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 «
0 24 14 0 11 0 12 0 24 0 26 0 0 25 11 0 7 0 8 0 25 0 23 0 0 17 6 0 17 0 8 0 30 0 25 0 1 18 12 12 10 10 8 8 19 19 23 23 1 18 8 8 12 12 9 9 22 22 19 19 1 16 10 10 12 12 7 7 22 22 29 29 1 20 10 10 11 11 4 4 25 25 25 25 1 16 11 11 11 11 11 11 23 23 21 21 1 18 16 16 12 12 7 7 17 17 22 22 1 17 11 11 13 13 7 7 21 21 25 25 0 23 13 0 14 0 12 0 19 0 24 0 0 30 12 0 16 0 10 0 19 0 18 0 1 23 8 8 11 11 10 10 15 15 22 22 1 18 12 12 10 10 8 8 16 16 15 15 1 15 11 11 11 11 8 8 23 23 22 22 1 12 4 4 15 15 4 4 27 27 28 28 0 21 9 0 9 0 9 0 22 0 20 0 1 15 8 8 11 11 8 8 14 14 12 12 1 20 8 8 17 17 7 7 22 22 24 24 0 31 14 0 17 0 11 0 23 0 20 0 0 27 15 0 11 0 9 0 23 0 21 0 1 34 16 16 18 18 11 11 21 21 20 20 1 21 9 9 14 14 13 13 19 19 21 21 1 31 14 14 10 10 8 8 18 18 23 23 1 19 11 11 11 11 8 8 20 20 28 28 0 16 8 0 15 0 9 0 23 0 24 0 1 20 9 9 15 15 6 6 25 25 24 24 1 21 9 9 13 13 9 9 19 19 24 24 1 22 9 9 16 16 9 9 24 24 23 23 1 17 9 9 13 13 6 6 22 22 23 23 1 24 10 10 9 9 6 6 25 25 29 29 0 25 16 0 18 0 16 0 2 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 time14 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
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
YT[t] = + 18.5439219142398 + 0.0622101960213318G[t] + 0.730621258268541X1[t] -0.0488988052248012X1_G[t] -0.23865725478243X2[t] -0.105245492279363X2_G[t] + 0.247229909963782X3[t] -0.501008474019651X3_G[t] + 0.334674427648451X4[t] + 0.172083243211216X4_G[t] -0.52672682818197X5[t] + 0.133226980233375`X5_G `[t] -0.0211658458013016t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)18.54392191423981.19709115.490800
G0.06221019602133180.0745090.83490.4051210.20256
X10.7306212582685410.1173886.22400
X1_G-0.04889880522480120.121642-0.4020.6882810.34414
X2-0.238657254782430.137157-1.740.0839610.041981
X2_G-0.1052454922793630.166405-0.63250.5280710.264036
X30.2472299099637820.1862111.32770.1863540.093177
X3_G-0.5010084740196510.097517-5.13761e-060
X40.3346744276484510.0893263.74670.0002570.000129
X4_G0.1720832432112160.0865761.98770.048720.02436
X5-0.526726828181970.093813-5.614600
`X5_G `0.1332269802333750.0918531.45040.1490820.074541
t-0.02116584580130160.010826-1.95510.0524820.026241


Multiple Linear Regression - Regression Statistics
Multiple R0.849135511888232
R-squared0.72103111754969
Adjusted R-squared0.6981021683072
F-TEST (value)31.4463218494766
F-TEST (DF numerator)12
F-TEST (DF denominator)146
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.65450296177352
Sum Squared Residuals1949.88721705127


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.43027153198820.56972846801179
22523.09780620285041.90219379714961
31717.6568799997603-0.656879999760318
41821.8107814240319-3.81078142403191
51821.2154141122496-3.21541411224959
61619.1302518211615-3.13025182116155
72023.3085968189630-3.30859681896303
81622.7531875278894-6.75318752788943
91823.3777995833619-5.3777995833619
101720.450649864873-3.45064986487299
112321.15210156948121.84789843051883
123022.58890110501077.41109889498928
132316.40840828898166.59159171101837
141823.2268487370287-5.22684873702865
151522.9728624514993-7.97286245149932
161217.4851742981152-5.48517429811525
172121.6651486012932-0.665148601293227
181520.2383769967131-5.23837699671314
192017.73963642409122.26036357590884
203124.17463356454866.82536643545139
212725.29484585760091.70515414239911
223422.838143228686611.1618567713134
232117.50595888204663.49404111795336
243122.24415174323378.75584825676631
251918.87993189321570.120068106784265
261617.5398583170390-1.53985831703897
272020.7138891814829-0.713889181482937
282117.57864711247963.42135288752039
292219.45306122773992.54693877226014
301720.2114239735722-3.21142397357221
312421.40686549394922.59313450605075
322525.2764941967240-0.276494196724022
332623.04707730201562.95292269798441
342523.81573933302871.18426066697133
351720.2759207726271-3.27592077262712
363228.59890121048963.40109878951037
373326.23636482040436.76363517959566
381323.2715471832359-10.2715471832359
393222.25795947395419.74204052604586
402525.682360753714-0.682360753714005
412919.92511569124279.07488430875734
422220.37246839730621.62753160269381
431817.72956552977790.270434470222058
441720.6574454678035-3.65744546780348
452021.075756238427-1.07575623842701
461520.2976711282779-5.29767112827793
472019.48066932549630.519330674503749
483329.28873886326273.71126113673728
492920.17910391800858.8208960819915
502323.8746024789380-0.87460247893803
512624.00610523616011.99389476383986
521818.6818634660854-0.681863466085368
532015.78743425565124.21256574434882
54612.7423353580560-6.74233535805596
5588.95533275311095-0.95533275311095
561311.88269754774051.11730245225953
57109.030597637527660.969402362472339
5889.25079194001516-1.25079194001516
59711.2077571202430-4.20775712024302
601518.6321323173743-3.63213231737432
6199.98827725926862-0.988277259268624
621010.5877077277315-0.587707727731456
631210.33921802421871.66078197578125
641314.2811157957265-1.28111579572652
651011.1648831659835-1.16488316598348
66117.749216649513153.25078335048685
67810.7012600102935-2.70126001029350
6897.02873600713761.9712639928624
691313.2245830565789-0.224583056578933
701111.4248953476096-0.424895347609600
71811.0423808240166-3.04238082401656
72910.4619036874179-1.46190368741792
7398.131365067459480.868634932540524
74159.178585791848675.82141420815133
7598.985862773437720.0141372265622786
761010.6642081481749-0.664208148174871
771412.83938205975831.16061794024171
781212.1813619972361-0.181361997236140
791211.10446361051170.895536389488292
801111.9157682572962-0.915768257296198
811412.57013495207781.42986504792223
8268.23618032037408-2.23618032037408
831211.01581974752920.984180252470836
8488.13754185188919-0.137541851889191
851414.2113340587138-0.211334058713820
861110.75500110991630.244998890083714
871010.1590211922866-0.159021192286559
881412.41392879075901.58607120924102
891212.3964359720643-0.396435972064284
901012.5284532104547-2.52845321045466
911414.3681853126345-0.368185312634538
9257.75153745777384-2.75153745777384
931112.1785421983973-1.1785421983973
941011.1487411707221-1.14874117072209
9599.61231434093077-0.612314340930776
96106.86844243560473.1315575643953
971610.70168835061445.29831164938556
981313.3591147417237-0.359114741723721
99911.0358153509783-2.03581535097827
1001012.9008068217531-2.90080682175314
1011010.9765235052967-0.976523505296659
102710.1944870675154-3.19448706751538
10398.492900886287320.507099113712681
10489.25198395925403-1.25198395925403
1051412.75964983477551.24035016522452
1061417.6169946212989-3.61699462129891
107812.6591641208644-4.65916412086439
108913.6614883179975-4.6614883179975
1091414.2956476082921-0.295647608292068
1101415.0938846105181-1.09388461051811
111811.4577560650174-3.45775606501737
11289.35765991735726-1.35765991735726
11387.411494261030540.588505738969455
11477.33580614820812-0.335806148208119
11564.682746381932161.31725361806784
11688.02947627924661-0.0294762792466125
11768.8905271822193-2.89052718221930
1181113.4729791874093-2.47297918740928
1191412.73608955999801.26391044000205
1201116.9130651429320-5.91306514293199
1211112.3852122537675-1.38521225376751
1221114.0439343478287-3.04393434782866
1231414.3105362698450-0.310536269844989
12489.63127963571698-1.63127963571697
1252010.86842307986889.13157692013115
126119.755667997886261.24433200211374
12789.12008080529924-1.12008080529924
1281110.00896675253460.99103324746545
129108.911077633198371.08892236680163
1301412.98920687624321.01079312375677
1311112.7578794199781-1.75787941997814
132911.0305543045231-2.03055430452308
13397.995645212244911.00435478775509
13489.37714962101867-1.37714962101867
1351011.5059762561231-1.50597625612307
136136.145238960896946.85476103910306
1371313.5433031111217-0.543303111121712
1381215.0797502021508-3.07975020215077
13988.46036575258291-0.460365752582913
1401315.9967530673342-2.99675306733424
1411417.5537031156223-3.55370311562232
142125.008553274239516.99144672576049
1431416.2710673551707-2.27106735517067
1441514.587568744840.412431255160004
1451311.45812536573491.54187463426507
1461613.76729577910492.23270422089512
14799.5627044280725-0.562704428072497
148910.4760595709918-1.47605957099177
149912.0785763545246-3.07857635452458
15088.55535352463767-0.555353524637675
15177.82755793085548-0.827557930855484
1521612.92328118272203.07671881727798
153115.553231151127615.44676884887239
15498.016014638879840.983985361120157
155119.554040993847581.44595900615242
15699.26027996129633-0.260279961296329
1571412.79398973721461.20601026278541
1581311.71141433480721.28858566519280
159169.418584138643346.58141586135666


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.4715656327671650.943131265534330.528434367232835
170.3027195215338640.6054390430677280.697280478466136
180.3386961391482100.6773922782964190.66130386085179
190.5176417205549050.964716558890190.482358279445095
200.4302532663162340.8605065326324690.569746733683766
210.3754245258626440.7508490517252890.624575474137356
220.8168955773792590.3662088452414830.183104422620741
230.7580993897872490.4838012204255020.241900610212751
240.9822875598120340.0354248803759330.0177124401879665
250.9768652767249160.04626944655016860.0231347232750843
260.9713814277781620.05723714444367670.0286185722218384
270.9583061531734980.08338769365300470.0416938468265024
280.9426136080239470.1147727839521050.0573863919760526
290.9203398213201330.1593203573597350.0796601786798673
300.9023034749208010.1953930501583990.0976965250791993
310.9308276085598360.1383447828803280.0691723914401639
320.9443501266944760.1112997466110490.0556498733055245
330.94924346330510.1015130733898010.0507565366949007
340.958061313196710.08387737360658130.0419386868032907
350.9709776525554420.05804469488911660.0290223474445583
360.9682909353959780.06341812920804340.0317090646040217
370.990940882828740.01811823434251970.00905911717125983
380.9996703213501130.0006593572997746130.000329678649887306
390.9999084049558130.0001831900883739859.15950441869923e-05
400.9998626163854290.0002747672291424990.000137383614571249
410.9999317877882080.0001364244235838246.82122117919118e-05
420.9999149997505160.0001700004989683918.50002494841957e-05
430.9998807696481780.0002384607036448890.000119230351822444
440.9998471232100180.0003057535799639210.000152876789981961
450.999810112433730.0003797751325415630.000189887566270782
460.999947139972510.0001057200549784405.28600274892201e-05
470.9999282326415180.0001435347169647637.17673584823816e-05
480.9999352256078090.0001295487843817946.47743921908971e-05
490.9999999484436141.03112771071824e-075.15563855359121e-08
500.9999999100234821.79953035256824e-078.99765176284121e-08
510.999999991212091.75758217465388e-088.7879108732694e-09
520.9999999845907453.08185105395242e-081.54092552697621e-08
5314.13042206721116e-202.06521103360558e-20
5411.61407830244153e-218.07039151220767e-22
5515.41881111997112e-212.70940555998556e-21
5619.0346137332179e-214.51730686660895e-21
5712.93737393785734e-211.46868696892867e-21
5819.41630729015494e-224.70815364507747e-22
5911.84883782631852e-229.24418913159262e-23
6013.73408504858449e-221.86704252429224e-22
6117.98758032810882e-223.99379016405441e-22
6212.39152756674451e-211.19576378337226e-21
6318.0204340155742e-214.0102170077871e-21
6418.08119412246517e-214.04059706123258e-21
6511.68583341087901e-208.42916705439504e-21
6612.37751439084313e-201.18875719542157e-20
6717.75201220833773e-203.87600610416886e-20
6811.06412017355714e-195.3206008677857e-20
6912.53580484305394e-191.26790242152697e-19
7016.34077608395306e-193.17038804197653e-19
7111.99086374697876e-189.95431873489381e-19
7215.85144612171303e-182.92572306085652e-18
7312.15685416246753e-181.07842708123376e-18
7411.11650308536899e-195.58251542684495e-20
7512.18913775673321e-191.09456887836660e-19
7616.40664076159268e-193.20332038079634e-19
7711.52880768868587e-187.64403844342937e-19
7814.72195226910635e-182.36097613455318e-18
7911.47965742767146e-177.39828713835732e-18
8013.47951318368306e-171.73975659184153e-17
8111.07578157052363e-165.37890785261814e-17
8213.28861076059634e-161.64430538029817e-16
8319.34709095341143e-164.67354547670571e-16
840.9999999999999992.70491200723316e-151.35245600361658e-15
850.9999999999999967.95887286825814e-153.97943643412907e-15
860.9999999999999882.32208433615442e-141.16104216807721e-14
870.999999999999976.00192793533862e-143.00096396766931e-14
880.9999999999999321.36875964486213e-136.84379822431067e-14
890.999999999999852.98711975569631e-131.49355987784816e-13
900.9999999999996626.75153401008661e-133.37576700504331e-13
910.9999999999990871.82555563785638e-129.12777818928189e-13
920.999999999998313.38139596094978e-121.69069798047489e-12
930.9999999999956578.6862205832746e-124.3431102916373e-12
940.9999999999895532.08929926882147e-111.04464963441073e-11
950.9999999999726975.4606338191621e-112.73031690958105e-11
960.9999999999340031.31994866958659e-106.59974334793295e-11
970.999999999946841.06318730825807e-105.31593654129034e-11
980.999999999874222.51559896088936e-101.25779948044468e-10
990.9999999997993084.01383144919376e-102.00691572459688e-10
1000.9999999996100577.79885850501357e-103.89942925250678e-10
1010.9999999991689371.66212566333608e-098.31062831668041e-10
1020.9999999991672141.66557246761023e-098.32786233805115e-10
1030.9999999981072683.78546322949954e-091.89273161474977e-09
1040.9999999954230139.15397310637772e-094.57698655318886e-09
1050.999999988924952.21501004832171e-081.10750502416086e-08
1060.9999999823939633.52120739764536e-081.76060369882268e-08
1070.9999999712442195.75115623426902e-082.87557811713451e-08
1080.9999999541060669.17878683520928e-084.58939341760464e-08
1090.9999998925342962.14931407832742e-071.07465703916371e-07
1100.9999997515456864.96908627531213e-072.48454313765607e-07
1110.9999994650968921.06980621522865e-065.34903107614326e-07
1120.999999038572881.92285424098849e-069.61427120494247e-07
1130.999998451184233.09763154039969e-061.54881577019984e-06
1140.9999970523179075.8953641850845e-062.94768209254225e-06
1150.999999611812057.7637590059848e-073.8818795029924e-07
1160.9999990750433831.84991323416342e-069.24956617081712e-07
1170.9999979393989524.12120209575748e-062.06060104787874e-06
1180.9999954878812469.02423750692174e-064.51211875346087e-06
1190.999990002877111.99942457814962e-059.99712289074812e-06
1200.9999840203475493.19593049019695e-051.59796524509847e-05
1210.9999661896667976.7620666406061e-053.38103332030305e-05
1220.9999317446233650.0001365107532696796.82553766348395e-05
1230.999855018031890.0002899639362206840.000144981968110342
1240.999700823584910.0005983528301825490.000299176415091275
1250.9999999999990191.96256737557483e-129.81283687787415e-13
1260.9999999999948561.02872480078326e-115.14362400391629e-12
1270.999999999985812.83778742639275e-111.41889371319637e-11
1280.9999999999196531.60693740333872e-108.03468701669359e-11
1290.9999999995606658.78669633664959e-104.39334816832479e-10
1300.9999999978792714.24145745854309e-092.12072872927154e-09
1310.9999999891320072.17359862647687e-081.08679931323843e-08
1320.9999999457125131.08574974077297e-075.42874870386484e-08
1330.9999997458480785.08303843869452e-072.54151921934726e-07
1340.9999988446894062.31062118806774e-061.15531059403387e-06
1350.999996728707466.54258508140731e-063.27129254070366e-06
1360.999994131585131.17368297411935e-055.86841487059675e-06
1370.9999736878567665.26242864681908e-052.63121432340954e-05
1380.999908417838140.0001831643237200039.15821618600016e-05
1390.9996230560375050.0007538879249894320.000376943962494716
1400.9985619607957810.002876078408437980.00143803920421899
1410.9960098353412790.007980329317442840.00399016465872142
1420.9996219040802450.0007561918395104620.000378095919755231
1430.997652347566480.00469530486703870.00234765243351935


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1060.828125NOK
5% type I error level1090.8515625NOK
10% type I error level1140.890625NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/10g9as1290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/10g9as1290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/1r8vg1290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/1r8vg1290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/2r8vg1290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/2r8vg1290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/32hc11290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/32hc11290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/42hc11290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/42hc11290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/52hc11290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/52hc11290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/6dqt41290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/6dqt41290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/7dqt41290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/7dqt41290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/860b71290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/860b71290690415.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/960b71290690415.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/25/t12906904275vrzsuj1kfex7td/960b71290690415.ps (open in new window)


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