Home » date » 2010 » Dec » 02 »

*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, 02 Dec 2010 15:23:25 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri.htm/, Retrieved Thu, 02 Dec 2010 16:21:52 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri.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 «
8 3 3 4 4 4 8 4 3 4 3 4 8 4 4 3 4 3 8 3 3 4 3 2 8 2 3 4 4 4 8 5 4 4 4 5 8 3 2 4 3 4 8 2 3 4 4 4 8 2 4 2 3 2 8 4 3 2 4 2 8 3 3 4 3 4 8 3 4 4 4 4 8 4 2 4 3 5 8 4 2 4 3 5 8 2 3 3 4 4 8 3 2 4 3 3 8 4 4 4 4 4 8 2 2 3 3 4 8 2 1 2 3 2 8 3 3 2 4 4 8 4 4 4 4 4 8 2 2 3 3 4 8 2 3 4 3 4 8 3 3 4 4 4 8 4 4 3 4 4 8 4 3 3 4 4 8 3 3 2 4 3 8 3 4 3 4 3 8 4 4 4 4 4 8 2 4 3 2 3 8 3 3 3 4 4 8 4 4 4 4 4 8 2 2 4 3 4 8 4 4 3 4 4 8 4 3 4 4 4 8 2 2 2 3 3 8 3 4 3 4 4 9 4 4 4 4 4 9 4 4 4 3 4 9 3 4 3 4 3 9 4 2 5 3 5 9 3 2 3 3 4 9 3 3 3 3 4 9 3 4 4 3 4 9 3 5 4 4 4 9 2 2 5 2 5 9 4 3 3 3 4 9 4 3 4 4 4 9 3 3 4 4 4 9 3 2 4 3 4 9 3 4 4 4 5 9 3 3 3 4 4 9 2 3 3 4 3 9 4 4 3 5 3 9 4 1 2 4 4 9 4 4 4 4 4 9 3 2 4 3 4 9 4 4 4 3 4 9 3 4 3 3 3 9 4 4 4 4 3 9 3 2 3 3 3 9 3 4 4 4 4 9 3 2 4 3 4 9 3 4 4 3 4 9 4 4 4 3 4 9 1 1 4 1 5 9 4 4 4 4 3 9 4 4 4 4 4 9 3 3 4 4 3 9 5 3 2 4 2 9 3 3 3 4 4 9 3 3 4 4 4 9 3 3 4 3 5 9 4 3 3 3 2 10 4 4 4 3 4 10 3 1 4 3 4 10 3 3 4 4 4 10 4 3 3 4 4 10 2 3 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time8 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
SocialVisible[t] = + 0.258701321270939 + 0.126268884105605Tijd[t] + 0.203513811021763ManyFriends[t] + 0.0129903610844389MakeNewFriends[t] + 0.236770771877937QuiteAccepted[t] + 0.111146519235846IntendMakeNewFriends[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.2587013212709390.6275840.41220.6808020.340401
Tijd0.1262688841056050.0525032.4050.0174620.008731
ManyFriends0.2035138110217630.0733392.7750.0062640.003132
MakeNewFriends0.01299036108443890.0964640.13470.8930670.446534
QuiteAccepted0.2367707718779370.0936722.52770.0125770.006289
IntendMakeNewFriends0.1111465192358460.0918011.21070.2280090.114005


Multiple Linear Regression - Regression Statistics
Multiple R0.460499502710478
R-squared0.212059791996598
Adjusted R-squared0.184315418475351
F-TEST (value)7.64334403997996
F-TEST (DF numerator)5
F-TEST (DF denominator)142
p-value2.18011195185497e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.697496479514215
Sum Squared Residuals69.0831901287307


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133.32302443597393-0.323024435973929
243.086253664096020.91374633590398
343.402401366675430.59759863332457
432.863960625624320.136039374375675
523.32302443597395-1.32302443597395
653.637684766231561.36231523376844
732.882739853074250.117260146925746
823.32302443597395-1.32302443597395
923.04149371447721-1.04149371447721
1043.074750675333380.925249324666617
1133.08625366409602-0.086253664096017
1233.52653824699572-0.526538246995716
1342.99388637231011.0061136276899
1442.99388637231011.0061136276899
1523.31003407488951-1.31003407488951
1632.771593333838410.228406666161592
1743.526538246995720.473461753004284
1822.86974949198982-0.869749491989815
1922.43095228141192-0.430952281411921
2033.29704371380508-0.297043713805076
2143.526538246995720.473461753004284
2222.86974949198982-0.869749491989815
2323.08625366409602-1.08625366409602
2433.32302443597395-0.323024435973954
2543.513547885911280.486452114088723
2643.310034074889510.689965925110485
2733.18589719456923-0.185897194569229
2833.40240136667543-0.402401366675431
2943.526538246995720.473461753004284
3022.92885982291956-0.928859822919558
3133.31003407488951-0.310034074889515
3243.526538246995720.473461753004284
3322.88273985307425-0.882739853074254
3443.513547885911280.486452114088723
3543.323024435973950.676975564026046
3622.74561261166953-0.74561261166953
3733.51354788591128-0.513547885911277
3843.652807131101320.347192868898679
3943.416036359223380.583963640776615
4033.52867025078104-0.528670250781036
4143.133145617500140.866854382499855
4232.996018376095420.00398162390457978
4333.19953218711718-0.199532187117183
4433.41603635922338-0.416036359223384
4533.85632094212308-0.856320942123084
4622.89637484562221-0.896374845622208
4743.199532187117180.800467812882817
4843.449293320079560.550706679920441
4933.44929332007956-0.449293320079558
5033.00900873717986-0.00900873717985918
5133.76395365033717-0.763953650337168
5233.43630295899512-0.436302958995120
5323.32515643975927-1.32515643975927
5443.765441022658970.234558977341028
5543.016284975867160.983715024132845
5643.652807131101320.347192868898679
5733.00900873717986-0.00900873717985918
5843.416036359223380.583963640776615
5933.2918994789031-0.291899478903099
6043.541660611865470.458339388134525
6132.884871856859570.115128143140426
6233.65280713110132-0.652807131101321
6333.00900873717986-0.00900873717985918
6433.41603635922338-0.416036359223384
6543.416036359223380.583963640776615
6612.44309990163807-1.44309990163807
6743.541660611865470.458339388134525
6843.652807131101320.347192868898679
6933.33814680084371-0.338146800843712
7053.201019559438991.79898044056101
7133.43630295899512-0.436302958995120
7233.44929332007956-0.449293320079558
7333.32366906743747-0.323669067437468
7442.977239148645491.02276085135451
7543.542305243328990.457694756671011
7632.93176381026370.0682361897362986
7733.57556220418516-0.575562204185163
7843.562571843100720.437428156899276
7923.45142532386488-1.45142532386488
8043.292544110366610.707455889633386
8133.44993795154307-0.449937951543073
8222.91298458281377-0.912984582813771
8343.327288443544590.672711556455407
8443.779076015206930.220923984793074
8533.56257184310072-0.562571843100724
8643.667929495971080.332070504028920
8743.562571843100720.437428156899276
8843.779076015206930.220923984793074
8933.76608565412249-0.766085654122487
9033.32580107122279-0.325801071222788
9143.135277621285460.864722378714536
9252.459709638829632.54029036117037
9332.898506849407530.101493150592473
9443.346067670994520.653932329005477
9543.338791432307230.661208567692773
9643.779076015206930.220923984793074
9743.779076015206930.220923984793074
9853.923479495298951.07652050470105
9943.338791432307230.661208567692773
10032.445231905423390.55476809457661
10143.575562204185160.424437795814837
10243.214654551986940.785345448013059
10343.779076015206930.220923984793074
10443.359058032078960.640941967921038
10543.562571843100720.437428156899276
10633.43843496278044-0.438434962780439
10743.338791432307230.661208567692773
10843.779076015206930.220923984793074
10943.779076015206930.220923984793074
11043.614480679311520.385519320688481
11143.542305243328990.457694756671011
11243.498317277269010.501682722730995
11343.701831088290770.298168911709232
11433.65558376635016-0.655583766350155
11543.465060316412830.534939683587168
11633.66857412743459-0.668574127434594
11733.48532691618457-0.485326916184567
11843.905344899312530.0946551006874692
11943.668574127434590.331425872565406
12043.465060316412830.534939683587168
12143.905344899312530.0946551006874692
12233.70183108829077-0.701831088290768
12333.57769420797048-0.577694207970483
12412.23806123182145-1.23806123182145
12543.905344899312530.0946551006874692
12633.90534489931253-0.90534489931253
12743.498317277269010.501682722730995
12843.701831088290770.298168911709232
12933.90534489931253-0.90534489931253
13043.701831088290770.298168911709232
13143.905344899312530.0946551006874692
13223.49831727726901-1.49831727726901
13344.10885871033429-0.108858710334293
13433.57769420797048-0.577694207970483
13533.89235453822809-0.892354538228092
13643.701831088290770.298168911709232
13743.905344899312530.0946551006874692
13833.70183108829077-0.701831088290768
13933.70183108829077-0.701831088290768
14033.49831727726901-0.498317277269006
14143.905344899312530.0946551006874692
14243.905344899312530.0946551006874692
14333.70183108829077-0.701831088290768
14444.14211567119047-0.142115671190467
14533.15039998615522-0.150399986155222
14643.794198380076680.205801619923316
14743.668574127434590.331425872565406
14843.353913797176990.646086202823015


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.9240793797891170.1518412404217650.0759206202108825
100.9978872346665410.004225530666917240.00211276533345862
110.9951910387169150.00961792256616970.00480896128308485
120.9919347697357180.01613046052856360.0080652302642818
130.9882347943166220.02353041136675610.0117652056833780
140.9820907379936580.0358185240126840.017909262006342
150.993815454644380.01236909071123790.00618454535561896
160.9893603869891220.02127922602175530.0106396130108776
170.986482154758820.02703569048236130.0135178452411806
180.9900722390588440.01985552188231210.00992776094115604
190.9844652990870080.03106940182598440.0155347009129922
200.975870851805260.04825829638948170.0241291481947409
210.9676627743374050.06467445132518960.0323372256625948
220.9701183462853530.05976330742929350.0298816537146467
230.9838895643536530.03222087129269350.0161104356463468
240.9767580414771960.0464839170456080.023241958522804
250.9708294270277630.05834114594447450.0291705729722373
260.9711819475103350.05763610497933080.0288180524896654
270.9595278409649730.0809443180700540.040472159035027
280.9478307945698550.1043384108602890.0521692054301445
290.9342014777212420.1315970445575160.0657985222787581
300.9400861821548880.1198276356902250.0599138178451125
310.9237329159217320.1525341681565360.076267084078268
320.9059441796633890.1881116406732220.0940558203366112
330.9120307660853920.1759384678292160.0879692339146078
340.8947336755596940.2105326488806120.105266324440306
350.8849621870180220.2300756259639560.115037812981978
360.8743604933093870.2512790133812260.125639506690613
370.864864927679240.2702701446415200.135135072320760
380.8335473455612440.3329053088775120.166452654438756
390.8072752853022250.385449429395550.192724714697775
400.8031028293169930.3937943413660140.196897170683007
410.7998766433676220.4002467132647570.200123356632378
420.7598124596550790.4803750806898420.240187540344921
430.722168201090990.555663597818020.27783179890901
440.7044440870121650.5911118259756710.295555912987835
450.7521389101691010.4957221796617970.247861089830899
460.7736711766247280.4526576467505440.226328823375272
470.798450915265740.4030981694685180.201549084734259
480.7732490134724540.4535019730550920.226750986527546
490.7604218614596760.4791562770806470.239578138540324
500.7188922804921970.5622154390156060.281107719507803
510.7462071527502410.5075856944995180.253792847249759
520.7236443854231870.5527112291536260.276355614576813
530.8189485662918620.3621028674162760.181051433708138
540.7928030447074360.4143939105851280.207196955292564
550.8209835764190780.3580328471618430.179016423580922
560.7926920696432080.4146158607135850.207307930356792
570.7561694611014920.4876610777970160.243830538898508
580.7482193111417820.5035613777164360.251780688858218
590.724950109627980.5500997807440410.275049890372020
600.6978813595814830.6042372808370340.302118640418517
610.661588615425080.6768227691498410.338411384574920
620.6762283801402670.6475432397194660.323771619859733
630.6327822558489370.7344354883021260.367217744151063
640.6154056198215210.7691887603569580.384594380178479
650.5975359637223370.8049280725553260.402464036277663
660.7618911011280460.4762177977439070.238108898871953
670.7304107003181770.5391785993636450.269589299681823
680.6911737598716090.6176524802567820.308826240128391
690.6862316725943780.6275366548112440.313768327405622
700.8580448168572150.2839103662855700.141955183142785
710.8599864494782960.2800271010434080.140013550521704
720.8735253210796520.2529493578406970.126474678920348
730.8921290394799170.2157419210401650.107870960520083
740.9005919492621010.1988161014757970.0994080507378987
750.882374723113530.2352505537729410.117625276886471
760.8628677857864070.2742644284271870.137132214213593
770.8792185789816820.2415628420366360.120781421018318
780.857028470892250.2859430582155020.142971529107751
790.9499256903709970.1001486192580050.0500743096290025
800.9486656154787390.1026687690425230.0513343845212614
810.956253576377290.0874928472454220.043746423622711
820.9799977279727180.04000454405456340.0200022720272817
830.980115859196550.03976828160689930.0198841408034497
840.9737738626144270.0524522747711450.0262261373855725
850.9773553960916720.04528920781665560.0226446039083278
860.9701130781478120.05977384370437650.0298869218521883
870.9619143060665760.07617138786684770.0380856939334238
880.9514217720011390.09715645599772220.0485782279988611
890.9662981560568830.0674036878862350.0337018439431175
900.967762956389970.06447408722006030.0322370436100301
910.964630360811280.0707392783774420.035369639188721
920.9997169246734420.000566150653116010.000283075326558005
930.9996960684439620.0006078631120758150.000303931556037908
940.9996810467033620.0006379065932757890.000318953296637894
950.9995191931458540.000961613708291470.000480806854145735
960.9992943262535350.001411347492929860.000705673746464929
970.9989954105909660.002009178818068250.00100458940903413
980.9989133685732760.002173262853447960.00108663142672398
990.9983819353288180.003236129342364730.00161806467118236
1000.9976425848197930.004714830360414930.00235741518020746
1010.9964299459955710.007140108008857220.00357005400442861
1020.996593140476690.00681371904662040.0034068595233102
1030.9951521815673030.009695636865394220.00484781843269711
1040.9941934611468860.01161307770622830.00580653885311417
1050.99214222605560.01571554788880090.00785777394440044
1060.9893381044109960.02132379117800730.0106618955890037
1070.9851092860620920.02978142787581680.0148907139379084
1080.9791158599954350.0417682800091290.0208841400045645
1090.9725407654555430.05491846908891380.0274592345444569
1100.9765960074619130.04680798507617390.0234039925380870
1110.967047522922090.06590495415582090.0329524770779105
1120.9687689605328750.06246207893424980.0312310394671249
1130.962878261953030.07424347609393820.0371217380469691
1140.9540641484749930.09187170305001420.0459358515250071
1150.951815863301520.09636827339696170.0481841366984808
1160.9611146204629470.07777075907410690.0388853795370535
1170.9593729754109480.0812540491781040.040627024589052
1180.9429384681744650.1141230636510690.0570615318255347
1190.9227425077156980.1545149845686050.0772574922843023
1200.9278574777951040.1442850444097920.0721425222048959
1210.9022119556392560.1955760887214870.0977880443607437
1220.8930779317510440.2138441364979110.106922068248956
1230.8699907048027540.2600185903944930.130009295197247
1240.906291486410280.1874170271794400.0937085135897199
1250.8738166383610490.2523667232779020.126183361638951
1260.9017310808765990.1965378382468020.0982689191234012
1270.9536013268012450.09279734639750920.0463986731987546
1280.9606704469828870.07865910603422520.0393295530171126
1290.981089796319070.03782040736185930.0189102036809297
1300.9882361346527640.02352773069447170.0117638653472359
1310.9785944334224180.04281113315516380.0214055665775819
1320.992120050855220.01575989828955870.00787994914477935
1330.9895866434714220.02082671305715690.0104133565285785
1340.9803335086824880.0393329826350240.019666491317512
1350.9596521936152630.08069561276947410.0403478063847371
1360.9808019196937450.03839616061250950.0191980803062548
1370.9542415565139410.09151688697211770.0457584434860588
1380.92099778690390.1580044261921990.0790022130960995
1390.8778671174805740.2442657650388510.122132882519426


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level140.106870229007634NOK
5% type I error level410.312977099236641NOK
10% type I error level660.50381679389313NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/10gl451291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/10gl451291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/1927b1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/1927b1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/22c6e1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/22c6e1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/32c6e1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/32c6e1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/42c6e1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/42c6e1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/5d3oh1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/5d3oh1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/6d3oh1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/6d3oh1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/7ncnk1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/7ncnk1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/8ncnk1291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/8ncnk1291303394.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/9gl451291303394.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291303302t8n00jw4t39t5ri/9gl451291303394.ps (open in new window)


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