Home » date » 2010 » Dec » 21 »

PAPER BAEYENS (Multiple Linear Regression2)

*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, 21 Dec 2010 14:03:10 +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/21/t1292940331i0n6j1a28j651xv.htm/, Retrieved Tue, 21 Dec 2010 15:05:34 +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/21/t1292940331i0n6j1a28j651xv.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 «
5 13 14 3 12 18 0 15 11 7 12 12 4 10 16 1 12 18 6 15 14 3 9 14 12 12 15 0 11 15 5 11 17 6 11 19 6 15 10 6 7 16 2 11 18 1 11 14 5 10 14 7 14 17 3 10 14 3 6 16 3 11 18 7 15 11 8 11 14 6 12 12 3 14 17 5 15 9 5 9 16 10 13 14 2 13 15 6 16 11 4 13 16 6 12 13 8 14 17 4 11 15 5 9 14 10 16 16 6 12 9 7 10 15 4 13 17 10 16 13 4 14 15 3 15 16 3 5 16 3 8 12 3 11 12 7 16 11 15 17 15 0 9 15 0 9 17 4 13 13 5 10 16 5 6 14 2 12 11 3 8 12 0 14 12 9 12 15 2 11 16 7 16 15 7 8 12 0 15 12 0 7 8 10 16 13 2 14 11 1 16 14 8 9 15 6 14 10 11 11 11 3 13 12 8 15 15 6 5 15 9 15 14 9 13 16 8 11 15 8 11 15 7 12 13 6 12 12 5 12 17 4 12 13 6 14 15 3 6 13 2 7 15 12 14 16 8 14 15 5 10 16 9 13 15 6 12 14 5 9 15 2 12 14 4 16 13 7 10 7 5 14 17 6 10 13 7 16 15 8 15 14 6 12 13 0 10 16 1 8 12 5 8 14 5 11 17 5 13 15 7 16 17 7 16 12 1 14 16 3 11 11 4 4 15 8 14 9 6 9 16 6 14 15 2 8 10 2 8 10 3 11 15 3 12 11 0 11 13 2 14 14 8 15 18 8 16 16 0 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
IEP[t] = + 11.9662638811661 + 0.272510555913099WP[t] -0.115233314432733HS[t] + 0.00420713199589517t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)11.96626388116611.5284187.829200
WP0.2725105559130990.0726673.75020.0002510.000125
HS-0.1152333144327330.097281-1.18450.2380480.119024
t0.004207131995895170.0050350.83550.4047280.202364


Multiple Linear Regression - Regression Statistics
Multiple R0.313673089491999
R-squared0.0983908070714556
Adjusted R-squared0.0805958887899713
F-TEST (value)5.52915194748778
F-TEST (DF numerator)3
F-TEST (DF denominator)152
p-value0.00124948454744112
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.81580162137916
Sum Squared Residuals1205.16829318615


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11311.71975739066921.28024260933077
21210.7180101531081.28198984689202
31510.71131881839374.28868118160629
41212.5078665273486-0.507866527348564
51011.2336087338742-1.23360873387423
61210.18981756926541.81018243073464
71512.01751073855772.98248926144232
8911.2041862028143-2.20418620281428
91213.5457550235953-1.54575502359533
101110.2798354846340.720164515365954
111111.41612876733-0.416128767329968
121111.4623798263735-0.462379826373496
131512.5036867882642.49631321173601
14711.8164940336635-4.81649403366348
151110.50019231314150.49980768685848
161110.69282214695520.307177853044752
171011.7870715026035-1.78707150260354
181411.99059980312742.00940019687257
191011.2504646547691-1.25046465476913
20611.0242051578996-5.02420515789956
211110.797945661030.20205433897001
221512.69882821770742.30117178229259
231112.6298459623182-1.6298459623182
241212.3194986113534-0.319498611353369
251410.93000750344633.0699924965537
261512.40110226273032.59889773726974
27911.598676193697-2.59867619369702
281313.1959027341239-0.195902734123878
291310.90479210438232.09520789561775
301612.45997471776153.54002528223853
311311.34299416576751.65700583423249
321212.2379223528878-0.237922352887797
331412.3262173389791.67378266102104
341111.4708488761879-0.470848876187924
35911.8627998785297-2.86279987852965
361612.99909316122563.00090683877443
371212.7198912705982-0.719891270598205
381012.3052090719108-2.3052090719108
391311.26141790730191.73858209269807
401613.36162163250742.63837836749265
411411.50029880015922.49970119984081
421511.11676206180933.88323793819075
43511.1209691938051-6.12096919380515
44811.586109583532-3.58610958353198
451111.5903167155279-0.590316715527872
461612.79979938560893.20020061439111
471714.52315770717862.47684229282135
48910.4397065004781-1.43970650047806
49910.2134470036085-1.21344700360849
501311.76862961698771.23137038301229
511011.6996473615985-1.69964736159851
52611.9343211224599-5.93432112245987
531211.46669653001470.533303469985333
54811.6281809034909-3.62818090349093
551410.81485636774753.18514363225247
561212.9259585596631-0.925958559663111
571110.90735848583460.0926415141654167
581612.38935171182873.6106482881713
59812.7392587871228-4.7392587871228
601510.8358920277274.164107972273
61711.3010324174538-4.30103241745383
621613.4541785364172.54582146358295
631411.50876784997362.49123215002638
641610.89476448275825.10523551724178
65912.6913121917131-3.69131219171307
661412.72666478404641.27333521595357
671113.9781913811751-2.97819138117509
681311.68708075143351.31291924856654
691512.70814071969662.29185928030335
70512.1673267398663-7.16732673986635
711513.10429885403431.89570114596573
721312.87803935716470.121960642835299
731112.7249692476802-1.72496924768023
741112.7291763796761-1.72917637967613
751212.6913395846244-0.691339584624388
761212.5382694751399-0.538269475139918
771211.6937994790590.306200520940951
781211.88642931287280.113570687127222
791412.20519092782941.7948090721706
80611.6223330209515-5.62233302095147
81711.1235629681688-4.1235629681688
821413.73764234486290.262357655137052
831412.76704056763921.23295943236082
841011.838482717463-1.83848271746305
851313.0479653875441-0.047965387544071
861212.3498741662334-0.349874166233403
87911.9663374278835-2.96633742788347
881211.26824620657280.7317537934272
891611.93270776482764.06729223517238
901013.4458464511592-3.44584645115921
911411.75269932700162.24730067299842
921012.4903502726415-2.49035027264151
931612.5366013316853.46339866831496
941512.92855233402682.07144766597324
951212.5029716686292-0.502971668629193
961010.5264155218483-0.526415521848298
97811.2640664674882-3.26406646748822
98812.127849194271-4.12784919427105
991111.7863563829687-0.786356382968743
1001312.02103014383010.978969856169895
1011612.33979175878673.66020824121327
1021612.92016546294633.07983453705371
1031410.82837600173273.17162399826734
1041111.9537708177184-0.95377081771842
105411.7695552478965-7.76955524789648
1061413.55520449014120.444795509858831
107912.2077573092817-3.20775730928174
1081412.32719775571041.67280224428964
109811.8175292362175-3.81752923621753
110811.8217363682134-3.82173636821343
1111111.5222874839588-0.522287483958754
1121211.98742787368560.012572126314419
1131110.94363670907670.0563632909232854
1141411.37763163846612.62236836153393
1151512.55596884820962.44403115179037
1161612.7906426090713.20935739092901
1171610.84523192262765.15476807737244
1181112.211991834189-1.21199183418895
1191413.30624118983720.69375881016276
1201412.49291665409381.50708334590616
1211212.7275904149552-0.7275904149552
1221411.68379925034632.31620074965367
123813.2078364033881-5.20783640338809
1241312.66702242355780.332977576442214
1251612.94374011146683.05625988853322
1261210.99832942502341.00167057497665
1271612.449177190683.55082280931999
1281210.54581043128421.45418956871579
1291111.6821037139801-0.682103713980133
130410.7846913241415-6.78469132414147
1311614.83451286778621.16548713221379
1321512.84705825429512.15294174570485
1331011.3423338319553-1.34233383195535
1341312.98160429942980.0183957005701641
1351511.89576920777333.10423079222666
1361211.23972191351030.760278086489698
1371412.91013784132231.08986215867774
138711.7511133622807-4.75111336228066
1391912.64604154940096.35395845059905
1401213.2793576473183-1.27935764731831
1411211.87896807270110.121031927298925
1421311.65270857583151.3472914241685
1431510.72415072565544.27584927434463
144813.6839300456477-5.68393004564772
1451211.93784052773230.0621594722677116
1461011.2817932334693-1.28179323346925
147811.5585109213782-3.55851092137825
1481014.0464585169295-4.0464585169295
1491513.11790066675341.88209933324664
1501611.56023385065584.43976614934423
1511312.39287111710110.607128882898876
1521613.28779930422142.71220069577858
153910.7662220456143-1.76622204561432
1541412.32140465899351.67859534100646
1551414.3063750697662-0.306375069766229
1561212.4870961644657-0.4870961644657


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.3078575347524080.6157150695048160.692142465247592
80.4306796714929410.8613593429858810.56932032850706
90.3072404298616320.6144808597232640.692759570138368
100.1960889557035370.3921779114070740.803911044296463
110.1212166478985570.2424332957971140.878783352101443
120.07560303231755260.1512060646351050.924396967682447
130.06360934911465960.1272186982293190.93639065088534
140.136514179981750.2730283599634990.86348582001825
150.1039360001546670.2078720003093330.896063999845333
160.06635938643160570.1327187728632110.933640613568394
170.04381900284650560.08763800569301120.956180997153494
180.08852950221582750.1770590044316550.911470497784172
190.06355059228016050.1271011845603210.93644940771984
200.1104567289965590.2209134579931190.88954327100344
210.09705995267008940.1941199053401790.90294004732991
220.1124936430985120.2249872861970250.887506356901488
230.08146666573664590.1629333314732920.918533334263354
240.05698770900882690.1139754180176540.943012290991173
250.09668210986551010.193364219731020.90331789013449
260.08219871671198670.1643974334239730.917801283288013
270.06983627785430740.1396725557086150.930163722145693
280.05309335463991410.1061867092798280.946906645360086
290.04675488876521670.09350977753043340.953245111234783
300.05154310038266870.1030862007653370.948456899617331
310.04273538079265080.08547076158530150.957264619207349
320.03093737123643880.06187474247287760.96906262876356
330.03081783384706240.06163566769412480.969182166152938
340.02263314156447580.04526628312895160.977366858435524
350.02780103714017680.05560207428035370.972198962859823
360.0399514215364990.0799028430729980.9600485784635
370.03426794881970210.06853589763940420.965732051180298
380.03067703356842870.06135406713685750.969322966431571
390.02654486738152920.05308973476305830.97345513261847
400.02686898017371720.05373796034743450.973131019826283
410.02415373136213680.04830746272427360.975846268637863
420.02968394157952280.05936788315904560.970316058420477
430.1181653862939760.2363307725879530.881834613706024
440.1506582931800660.3013165863601320.849341706819934
450.123248159563850.24649631912770.87675184043615
460.129972407463470.2599448149269390.87002759253653
470.1241594330283610.2483188660567210.87584056697164
480.1031229548288890.2062459096577780.896877045171111
490.08263812800663880.1652762560132780.917361871993361
500.0683278235857760.1366556471715520.931672176414224
510.0567600617208160.1135201234416320.943239938279184
520.1235999950070660.2471999900141320.876400004992934
530.1014302312348250.2028604624696510.898569768765175
540.1103591142055610.2207182284111210.889640885794439
550.13063450907860.2612690181572010.8693654909214
560.106719714474830.2134394289496590.89328028552517
570.08763593637455040.1752718727491010.91236406362545
580.1112387099194640.2224774198389270.888761290080537
590.1566337222576510.3132674445153010.84336627774235
600.2071581972509580.4143163945019160.792841802749042
610.2519770699492690.5039541398985380.74802293005073
620.2515524389496380.5031048778992760.748447561050362
630.2519270846161290.5038541692322590.74807291538387
640.3694459354906640.7388918709813290.630554064509336
650.3898370414095680.7796740828191360.610162958590432
660.3601220113775420.7202440227550840.639877988622458
670.356550150701450.7131003014029010.64344984929855
680.3305554012086240.6611108024172480.669444598791376
690.3276058255293840.6552116510587690.672394174470615
700.535161198993060.929677602013880.46483880100694
710.5217461990474480.9565076019051040.478253800952552
720.4773224944456340.9546449888912680.522677505554366
730.4394645264399790.8789290528799590.560535473560021
740.4021654188563740.8043308377127490.597834581143626
750.3578516862036350.715703372407270.642148313796365
760.3153447012197870.6306894024395740.684655298780213
770.2792118661254860.5584237322509720.720788133874514
780.2432258999835030.4864517999670060.756774100016497
790.2311433286295080.4622866572590150.768856671370492
800.3167977678589620.6335955357179250.683202232141038
810.3408438528218760.6816877056437520.659156147178124
820.3025880738372340.6051761476744680.697411926162766
830.2773664601847060.5547329203694120.722633539815294
840.248621309622640.497242619245280.75137869037736
850.2140872044072650.4281744088145290.785912795592735
860.1819374448065720.3638748896131440.818062555193428
870.1764087423786330.3528174847572670.823591257621367
880.1533167506024260.3066335012048510.846683249397574
890.1981777652178140.3963555304356280.801822234782186
900.2033756325535850.406751265107170.796624367446415
910.1985937897125720.3971875794251440.801406210287428
920.1849306747517790.3698613495035590.81506932524822
930.2093923390614850.418784678122970.790607660938515
940.1998252285839640.3996504571679290.800174771416036
950.1682251503655850.336450300731170.831774849634415
960.1400814315748380.2801628631496770.859918568425162
970.1410513008664650.2821026017329290.858948699133535
980.1642269897427680.3284539794855360.835773010257232
990.1379651386973230.2759302773946450.862034861302677
1000.1175006797495660.2350013594991310.882499320250434
1010.1390113286966490.2780226573932980.860988671303351
1020.1489702429013320.2979404858026640.851029757098668
1030.1630528897049160.3261057794098330.836947110295084
1040.1358908130380880.2717816260761750.864109186961912
1050.3487240649381360.6974481298762710.651275935061864
1060.3055001490050420.6110002980100840.694499850994958
1070.3139861158167770.6279722316335540.686013884183223
1080.2860227382864030.5720454765728050.713977261713597
1090.3357150923675480.6714301847350960.664284907632452
1100.431466478039210.862932956078420.56853352196079
1110.3948148436622790.7896296873245580.605185156337721
1120.3698108492879530.7396216985759050.630189150712047
1130.3490234769765460.6980469539530910.650976523023454
1140.3225064251731660.6450128503463320.677493574826834
1150.3165618539217290.6331237078434590.683438146078271
1160.3319710547944780.6639421095889570.668028945205521
1170.3929052857538140.7858105715076290.607094714246186
1180.3589528328680180.7179056657360350.641047167131982
1190.310776711728090.6215534234561790.68922328827191
1200.2716648239141060.5433296478282110.728335176085894
1210.2412739837980350.4825479675960690.758726016201965
1220.2136787496514650.427357499302930.786321250348535
1230.3196097999960240.6392195999920490.680390200003976
1240.2698335586630990.5396671173261980.730166441336901
1250.267968803817260.5359376076345210.73203119618274
1260.2243524261118940.4487048522237870.775647573888106
1270.2816418799635370.5632837599270750.718358120036463
1280.2507280448608880.5014560897217750.749271955139112
1290.2191510327992190.4383020655984390.780848967200781
1300.5618407082629530.8763185834740940.438159291737047
1310.5624840032740220.8750319934519550.437515996725978
1320.5091537973731110.9816924052537780.490846202626889
1330.4921396549399860.9842793098799710.507860345060014
1340.4334882416055130.8669764832110270.566511758394487
1350.4478748458265530.8957496916531070.552125154173447
1360.3820970036257560.7641940072515130.617902996374244
1370.3133789054903020.6267578109806050.686621094509698
1380.5703452394644950.859309521071010.429654760535505
1390.7006896396054610.5986207207890770.299310360394539
1400.648154339011470.7036913219770620.351845660988531
1410.5694215452555640.8611569094888720.430578454744436
1420.5000177345287260.9999645309425490.499982265471274
1430.650267801456450.69946439708710.34973219854355
1440.6582250282596040.6835499434807920.341774971740396
1450.5774964007966590.8450071984066810.422503599203341
1460.4589484538667030.9178969077334060.541051546133297
1470.4433012772463220.8866025544926450.556698722753678
1480.8826862296027980.2346275407944040.117313770397202
1490.828332852294890.343334295410220.17166714770511


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.013986013986014OK
10% type I error level140.097902097902098OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/10o5iz1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/10o5iz1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/1h43n1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/1h43n1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/2se2q1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/2se2q1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/3se2q1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/3se2q1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/4se2q1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/4se2q1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/5se2q1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/5se2q1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/6kn2b1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/6kn2b1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/7de1w1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/7de1w1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/8de1w1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/8de1w1292940178.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/9o5iz1292940178.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292940331i0n6j1a28j651xv/9o5iz1292940178.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