Home » date » 2010 » Dec » 14 »

WS 10 - MR: Organization

*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: Tue, 14 Dec 2010 16:06:02 +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/14/t1292342661m4siwggwrsfkono.htm/, Retrieved Tue, 14 Dec 2010 17:04:35 +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/14/t1292342661m4siwggwrsfkono.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 25 11 7 8 25 23 0 17 6 17 8 30 25 0 18 8 12 9 22 19 0 16 10 12 7 22 29 0 20 10 11 4 25 25 0 16 11 11 11 23 21 0 18 16 12 7 17 22 0 17 11 13 7 21 25 0 30 12 16 10 19 18 0 23 8 11 10 15 22 0 18 12 10 8 16 15 0 21 9 9 9 22 20 0 31 14 17 11 23 20 0 27 15 11 9 23 21 0 21 9 14 13 19 21 0 16 8 15 9 23 24 0 20 9 15 6 25 24 0 17 9 13 6 22 23 0 25 16 18 16 26 24 0 26 11 18 5 29 18 0 25 8 12 7 32 25 0 17 9 17 9 25 21 0 32 12 18 12 28 22 0 22 9 14 9 25 23 0 17 9 16 5 25 23 0 20 14 14 10 18 24 0 29 10 12 8 25 23 0 23 14 17 7 25 21 0 20 10 12 8 20 28 0 11 6 6 4 15 16 0 26 13 12 8 24 29 0 22 10 12 8 26 27 0 14 15 13 8 14 16 0 19 12 14 7 24 28 0 20 11 11 8 25 25 0 28 8 12 7 20 22 0 19 9 9 7 21 23 0 30 9 15 9 27 26 0 29 15 18 11 23 23 0 26 9 15 6 25 25 0 23 10 12 8 20 21 0 21 12 14 9 22 24 0 28 11 13 6 25 22 0 23 14 13 10 25 27 0 18 6 11 8 17 26 0 20 8 16 10 25 24 0 21 10 11 5 26 24 0 28 12 16 14 27 22 0 10 5 8 6 19 24 0 22 10 15 6 22 20 0 31 10 21 12 32 26 0 29 13 18 12 21 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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 15.1221163728982 + 1.88594086825902Gender[t] -0.0545464258288678CM[t] + 0.14601855026369D[t] -0.107909720696322PE[t] -0.222522303520102PC[t] + 0.419080093545205PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)15.12211637289821.9666967.689100
Gender1.885940868259020.5803823.24950.0014230.000712
CM-0.05454642582886780.061246-0.89060.3745410.187271
D0.146018550263690.1114941.30970.1922890.096144
PE-0.1079097206963220.10194-1.05860.2914810.14574
PC-0.2225223035201020.126918-1.75330.081570.040785
PS0.4190800935452050.0733685.71200


Multiple Linear Regression - Regression Statistics
Multiple R0.522382553604487
R-squared0.272883532310344
Adjusted R-squared0.244181566480490
F-TEST (value)9.50748579132165
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value7.26832949382583e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.39491293472217
Sum Squared Residuals1751.86594282028


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12323.3061156456720-0.306115645672036
22524.02869756174740.97130243825255
31921.2305737880458-2.23057378804582
42922.07674834727116.92325165272886
52523.89127955584791.10872044415209
62121.8596674976960-0.859667497695954
72220.74836632946951.25163367053048
82521.64123065746443.35876934253556
91819.2486894122132-1.24868941221316
102217.90966842126134.09033157873873
111519.7385091727421-4.7385091727421
122021.5366822229119-1.53668222291188
132020.8320684368761-0.832068436876072
142122.2887756216734-1.28877562167337
152118.84980412471422.15019587528576
162421.43501757115982.5649824288402
172422.86857751575871.13142248424127
182321.99079595400241.00920404599763
192421.48810313471542.51189686528456
201824.4084495769249-6.40844957692486
212525.484594349736-0.484594349736
222122.1488304412924-1.14883044129239
232222.2504533540294-0.250453354029424
242322.1998274742370.800172525762988
252323.1468293760691-0.146829376069117
262419.88293011887674.11706988112334
272322.40236278861140.597637211388627
282122.9966892446778-1.99668924467783
292820.79788015334527.20211984665484
301620.1468708552825-4.14687085528253
312922.58497762334386.41502237665616
322723.20326786295873.79673213704135
331619.2328611776693-3.23286117766927
342822.82748691600975.17251308399031
352523.14720889203121.85279110796880
362220.29199394970691.70800605029306
372321.67173958806461.32826041193539
382622.49370653400023.50629346599984
392320.97927011810122.02072988189882
402522.54129896078552.45870103921447
412120.63424087585860.365759124141444
422421.43518927022132.56481072977866
432222.9400626510478-0.940062651047814
442722.76076121690284.23923878309718
452619.17356824400886.82643175599116
462421.72456003071832.27543996928169
472424.0332909200441-0.03329092004415
482221.82033379815210.179666201847870
492421.07085505659572.92914494340432
502021.6482629337291-1.64826293372907
512623.36555389142282.63444610857723
522119.62655052696331.37344947303672
531919.7427173939007-0.742717393900692
542121.122707387365-0.122707387365001
551619.451448951167-3.45144895116701
562220.26524222889161.73475777110845
571520.6274585758766-5.62745857587660
581720.0514781848112-3.05147818481125
591519.4616414784843-4.46164147848427
602120.95608633969670.0439136603032818
611918.59570977586870.404290224131271
622417.90958336223076.09041663776927
631725.0582685418496-8.05826854184958
642324.3496094505398-1.34960945053977
652421.70276603954242.29723396045756
661421.8242042423637-7.82420424236368
672224.3970992499823-2.39709924998229
681620.2364592814665-4.23645928146655
691922.4848756185153-3.48487561851526
702521.87107811318033.12892188681974
712422.72264402452561.27735597547442
722622.7281287984863.27187120151401
732620.88771135363545.11228864636464
742523.29524110059221.70475889940781
751821.7356495948753-3.73564959487531
762119.19372693221611.80627306778388
772321.09968694521221.90031305478778
782021.3709931692890-1.37099316928897
791321.2876581748591-8.28765817485906
801520.8523916219684-5.85239162196839
811422.1949372353157-8.19493723531572
822223.5474000683615-1.54740006836153
831017.6176644540326-7.61766445403256
842221.23151414490110.76848585509894
852424.6695886050205-0.66958860502045
861921.3851804796882-2.38518047968824
872021.4013737208431-1.4013737208431
881316.4567240674248-3.45672406742479
892019.73588615272720.264113847272804
902222.7596924810015-0.759692481001539
912422.48230153969191.51769846030811
922922.98511869784936.01488130215072
931220.3529138235261-8.3529138235261
942020.6443297946186-0.644329794618582
952120.73355567336680.266444326633248
962221.19622937043970.803770629560266
972017.28119401713912.71880598286093
982623.94385040014022.05614959985980
992322.88169032163670.118309678363270
1002421.43324864589042.56675135410962
1012224.4677217023441-2.46772170234414
1022825.74400183346092.25599816653914
1031220.2579452096462-8.25794520964623
1042422.91291780820571.08708219179430
1052021.9003372203891-1.90033722038913
1062322.04554379284360.954456207156377
1072822.99229571839315.00770428160695
1082421.733743927752.26625607225001
1092323.4508688075582-0.450868807558179
1102925.32980955514393.6701904448561
1112627.4458698242759-1.44586982427592
1122226.2421505535834-4.24215055358339
1132223.3520839339131-1.35208393391308
1142326.6973691384142-3.69736913841416
1153024.19895502025225.80104497974778
1161719.9547041499017-2.95470414990172
1172325.4141210242680-2.41412102426805
1182523.35649997197221.64350002802778
1192428.3565265785553-4.35652657855528
1202426.1353513078034-2.13535130780339
1212423.06597541654340.934024583456574
1222022.1810291593008-2.18102915930081
1232224.4609687383918-2.46096873839178
1242824.94993478209653.05006521790352
1252524.15523981948780.844760180512194
1262424.6427298563-0.64272985630001
1272425.116406477499-1.11640647749899
1282323.5856818176043-0.585681817604278
1293027.94009884105462.05990115894542
1302422.73784314474601.26215685525402
1312125.4179998312895-4.41799983128947
1322523.96367131140041.03632868859956
1332524.40593518335010.594064816649902
1342924.50346426998874.49653573001132
1352222.3943218820612-0.394321882061161
1362723.78438164497273.21561835502728
1372422.56617656677381.43382343322619
1382925.12159679452793.87840320547214
1392121.7036494703175-0.703649470317532
1402421.46755694565752.53244305434253
1412322.7820810671970.217918932803005
1422722.67429410437074.32570589562932
1432522.94065998770122.05934001229877
1442121.9767110135990-0.976711013599046
1452122.5444620134524-1.54446201345244
1462922.76712105882856.23287894117155
1472121.7811786394597-0.78117863945972
1482023.6697201209574-3.66972012095741
1491923.7622526184836-4.76225261848364
1502423.28707181499590.712928185004062
1511321.2180070139171-8.21800701391713
1522524.43363404283010.566365957169871
1532322.70937106193150.290628938068539
1542624.73415866071931.26584133928067
1552320.95295422159452.04704577840551
1562224.0007563060825-2.00075630608249
1572422.75198098858851.24801901141150
1582424.9855629546809-0.98556295468088
1592424.6157539109051-0.615753910905134


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.6673609779071460.6652780441857080.332639022092854
110.8826274316807660.2347451366384680.117372568319234
120.8150445576017170.3699108847965650.184955442398283
130.7279100989359210.5441798021281580.272089901064079
140.6264958029722720.7470083940554560.373504197027728
150.5661206073277060.8677587853445890.433879392672294
160.4681267312557510.9362534625115020.531873268744249
170.3779752725949610.7559505451899220.622024727405039
180.2990281108390560.5980562216781120.700971889160944
190.2711051347856590.5422102695713170.728894865214341
200.4311906668327060.8623813336654120.568809333167294
210.3604216408564110.7208432817128220.639578359143589
220.3266411724738480.6532823449476960.673358827526152
230.2650636049660920.5301272099321840.734936395033908
240.2067085309919290.4134170619838580.793291469008071
250.1565257297050420.3130514594100840.843474270294958
260.1534774779177750.3069549558355500.846522522082225
270.1263137904097790.2526275808195580.873686209590221
280.09841604144020370.1968320828804070.901583958559796
290.2157515349461840.4315030698923680.784248465053816
300.3186664755123780.6373329510247570.681333524487622
310.4955369560589780.9910739121179570.504463043941022
320.4978985253155040.9957970506310090.502101474684496
330.5185171333471390.9629657333057230.481482866652861
340.5809420274129140.8381159451741730.419057972587086
350.5291772578442290.9416454843115430.470822742155771
360.4869978889291620.9739957778583240.513002111070838
370.4326443247407720.8652886494815430.567355675259228
380.4196412263160250.839282452632050.580358773683975
390.3752715391428770.7505430782857550.624728460857123
400.3465235392969280.6930470785938560.653476460703072
410.2973477176646090.5946954353292180.702652282335391
420.2677782295989470.5355564591978940.732221770401053
430.2287134827077380.4574269654154750.771286517292262
440.2336346883490590.4672693766981190.76636531165094
450.3396711117462550.6793422234925090.660328888253745
460.3031593384305460.6063186768610920.696840661569454
470.2590266829623030.5180533659246060.740973317037697
480.2326656554323230.4653313108646470.767334344567677
490.2139190449383780.4278380898767560.786080955061622
500.1885722845288210.3771445690576410.81142771547118
510.1689687867249600.3379375734499210.83103121327504
520.1423725887127270.2847451774254540.857627411287273
530.1211467417493190.2422934834986380.878853258250681
540.1023023194418700.2046046388837410.89769768055813
550.1153205577427970.2306411154855940.884679442257203
560.09800115990961470.1960023198192290.901998840090385
570.1273531777241740.2547063554483480.872646822275826
580.1283057686469300.2566115372938610.87169423135307
590.1624001187388800.3248002374777590.83759988126112
600.1357094018812640.2714188037625280.864290598118736
610.111692882562940.223385765125880.88830711743706
620.1775690424470710.3551380848941410.822430957552929
630.4313621137981480.8627242275962970.568637886201852
640.41369082856480.82738165712960.5863091714352
650.3957689872379990.7915379744759980.604231012762001
660.5836164297677790.8327671404644420.416383570232221
670.5527169422085690.8945661155828620.447283057791431
680.5771288301839090.8457423396321820.422871169816091
690.5822579972237640.8354840055524730.417742002776236
700.588080043298380.823839913403240.41191995670162
710.5547012134089120.8905975731821760.445298786591088
720.5643982973796620.8712034052406760.435601702620338
730.643872890264250.7122542194714990.356127109735750
740.6223934514791820.7552130970416360.377606548520818
750.6284172711358540.7431654577282930.371582728864147
760.6171399529974450.7657200940051110.382860047002555
770.6162048933795550.767590213240890.383795106620445
780.5759711164583070.8480577670833850.424028883541693
790.7497019439664940.5005961120670130.250298056033506
800.8000461985601870.3999076028796250.199953801439813
810.9003569033627210.1992861932745580.0996430966372788
820.880546858361320.2389062832773610.119453141638680
830.9565601395256450.08687972094871050.0434398604743553
840.9454600843725170.1090798312549660.0545399156274828
850.9315386408229810.1369227183540370.0684613591770187
860.9218590366261760.1562819267476480.0781409633738238
870.9054007336080730.1891985327838550.0945992663919274
880.9013651289568140.1972697420863730.0986348710431864
890.8799372331217630.2401255337564740.120062766878237
900.8554098466107920.2891803067784170.144590153389208
910.8318637660072330.3362724679855340.168136233992767
920.9072450236471430.1855099527057150.0927549763528573
930.9644984323733110.07100313525337780.0355015676266889
940.9569999237505770.08600015249884580.0430000762494229
950.9445375956440480.1109248087119040.0554624043559522
960.930733509184270.1385329816314610.0692664908157305
970.9188362969345970.1623274061308070.0811637030654034
980.9003373457689440.1993253084621130.0996626542310564
990.8783680905414050.243263818917190.121631909458595
1000.8593038728207410.2813922543585180.140696127179259
1010.8544529430959280.2910941138081450.145547056904072
1020.8455240275760960.3089519448478070.154475972423904
1030.9562009498678770.08759810026424520.0437990501321226
1040.947482965465640.1050340690687180.0525170345343591
1050.9398796738278920.1202406523442160.0601203261721082
1060.9235817645429290.1528364709141430.0764182354570714
1070.9419924400877150.1160151198245700.0580075599122851
1080.9327322078236160.1345355843527680.0672677921763839
1090.9140143152221120.1719713695557760.085985684777888
1100.9294421486019350.1411157027961300.0705578513980652
1110.9125369979096180.1749260041807650.0874630020903823
1120.9135701821304010.1728596357391980.0864298178695991
1130.8993595275964990.2012809448070020.100640472403501
1140.9005107229891150.1989785540217700.0994892770108849
1150.9414246907813910.1171506184372170.0585753092186086
1160.939734319019220.1205313619615610.0602656809807805
1170.9301681011273970.1396637977452060.0698318988726032
1180.911589378498510.1768212430029820.0884106215014908
1190.9228302255564020.1543395488871960.077169774443598
1200.9219016363900810.1561967272198380.0780983636099188
1210.9011383554289820.1977232891420360.0988616445710179
1220.9016833788695230.1966332422609540.0983166211304771
1230.882258697161270.2354826056774600.117741302838730
1240.9057397010038770.1885205979922460.0942602989961232
1250.8773156230567370.2453687538865250.122684376943263
1260.841923538407850.3161529231843010.158076461592151
1270.8309167558249250.3381664883501490.169083244175075
1280.788117337017520.4237653259649600.211882662982480
1290.788629743846030.4227405123079390.211370256153970
1300.7782145213410990.4435709573178010.221785478658901
1310.8065598690882510.3868802618234970.193440130911749
1320.7563607007600650.487278598479870.243639299239935
1330.6999797679059740.6000404641880520.300020232094026
1340.7140640116117680.5718719767764640.285935988388232
1350.6534053008735770.6931893982528450.346594699126423
1360.7410574556355750.5178850887288510.258942544364425
1370.6937510573066320.6124978853867370.306248942693368
1380.6535962796102490.6928074407795020.346403720389751
1390.573743221811390.852513556377220.42625677818861
1400.5253797934884920.9492404130230170.474620206511508
1410.4710897043451620.9421794086903250.528910295654838
1420.4651040231581770.9302080463163550.534895976841823
1430.4029278381839140.8058556763678280.597072161816086
1440.3125011760142070.6250023520284140.687498823985793
1450.2286049617937620.4572099235875240.771395038206238
1460.3820103031736620.7640206063473230.617989696826338
1470.2694705044439290.5389410088878590.73052949555607
1480.3306400924506670.6612801849013340.669359907549333
1490.4255436638165750.851087327633150.574456336183425


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level40.0285714285714286OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/10jjcz1292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/10jjcz1292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/1c0xn1292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/1c0xn1292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/2c0xn1292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/2c0xn1292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/3c0xn1292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/3c0xn1292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/45aw81292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/45aw81292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/55aw81292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/55aw81292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/65aw81292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/65aw81292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/7ravw1292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/7ravw1292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/8ravw1292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/8ravw1292342749.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/9ravw1292342749.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342661m4siwggwrsfkono/9ravw1292342749.ps (open in new window)


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