Home » date » 2010 » Nov » 23 »

*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, 23 Nov 2010 14:16:38 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo.htm/, Retrieved Tue, 23 Nov 2010 15:16:13 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo.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 «
9 5.5 6 5.33 12 9 3.5 4 5.56 11 9 8.5 4 3.78 14 9 5 4 4.00 12 9 6 4.5 4.00 21 9 6 3.5 3.56 12 9 5.5 2 4.44 22 9 5.5 5.5 3.56 11 9 6 3.5 4.00 10 9 6.5 3.5 3.78 13 9 7 6 5.11 10 9 8 5 6.67 8 9 5.5 5 5.11 15 9 5 4 4.00 14 9 5.5 4 3.33 10 9 7.5 2 2.67 14 9 4.5 4.5 4.67 14 9 5.5 4 3.33 11 9 8.5 3.5 4.44 10 9 8.5 5.5 6.89 13 9 5.5 4.5 6.00 7 9 9 5.5 7.56 14 9 7 6.5 4.67 12 9 5 4 6.89 14 9 5.5 4 4.22 11 9 7.5 4.5 3.56 9 9 7.5 3 4.44 11 9 6.5 4.5 4.67 15 9 8 4.5 4.89 14 9 6.5 3 3.78 13 9 4.5 3 5.33 9 9 9 8 5.56 15 9 9 2.5 5.78 10 9 6 3.5 5.56 11 9 8.5 4.5 3.78 13 9 4.5 3 7.11 8 9 4.5 3 7.33 20 9 6 2.5 2.89 12 9 9 6 7.11 10 9 6 3.5 5.56 10 9 9 5 6.44 9 9 7 4.5 4.89 14 9 7.5 4 4.00 8 9 8 2.5 3.78 14 9 5 4 4.44 11 9 5.5 4 3.33 13 9 7 5 4.44 9 9 4.5 3 7.33 11 9 6 4 6.44 15 9 8.5 3.5 5.11 11 9 2.5 2 5.78 10 9 6 4 4.00 14 9 6 4 4.44 18 10 3 2 2.44 14 10 12 10 6.22 11 10 6 4 5.78 12 10 6 4 4.89 13 10 7 3 3.78 9 10 3.5 2 2.67 10 10 6.5 4 3.11 15 10 6 4.5 3.78 20 10 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time15 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Depression[t] = + 9.24355550579304 + 0.493286378792208Month[t] -0.00260207016403216Expect[t] -0.0557478262810441Criticism[t] -0.214965647664329Concerns[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)9.243555505793043.3058742.79610.0058320.002916
Month0.4932863787922080.309081.5960.1125420.056271
Expect-0.002602070164032160.183669-0.01420.9887150.494357
Criticism-0.05574782628104410.232612-0.23970.8109120.405456
Concerns-0.2149656476643290.210983-1.01890.309860.15493


Multiple Linear Regression - Regression Statistics
Multiple R0.161389265252687
R-squared0.0260464949388022
Adjusted R-squared0.000749001300848984
F-TEST (value)1.02960772761003
F-TEST (DF numerator)4
F-TEST (DF denominator)154
p-value0.393886977846912
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.1442247281482
Sum Squared Residuals1522.46696772919


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11212.1885676692836-0.18856766928365
21112.2558253632109-1.25582536321095
31412.62545386523331.37454613476670
41212.5872686683213-0.587268668321265
52112.55679268501678.44320731498328
61212.7071253962701-0.70712539627006
72212.60287840082909.39712159917097
81112.59693077879-1.59693077878999
91012.6125405112978-2.61254051129776
101312.65853191870190.341468081298109
111012.2319570065237-2.23195700652371
12811.9497563522844-3.94975635228437
131512.29160793805082.7083920619492
141412.58726866832131.41273133167873
151012.7299946171743-2.72999461717435
161412.97816345686681.02183654313317
171412.41666880632771.58333119367234
181112.7299946171744-1.72999461717435
191012.5114504509154-2.51145045091537
201311.87328896157571.12671103842433
21712.1281624247701-5.12816242477007
221411.72796094255862.27203905744144
231212.2986679783555-0.298667978355490
241411.96601794657142.03398205342865
251112.5386751907531-1.53867519075310
26912.6474744647430-3.64747446474297
271112.5419264342199-1.54192643421992
281512.41146466599962.58853533400041
291412.36026911826741.63973088173261
301312.68640583184240.313594168157587
31912.3584132182908-3.35841321829077
321512.01852267218462.98147732781539
331012.2778432742442-2.27784327424420
341112.2771941009414-1.27719410094140
351312.59757995209280.402420047907217
36811.9757743654483-3.97577436544826
372011.92848192296218.0715180770379
381212.9069002064862-0.906900206486205
391011.796821570867-1.79682157086698
401012.2771941009414-2.2771941009414
41911.9965963810831-2.99659638108313
421412.36287118843141.63712881156857
43812.5807634929112-4.58076349291119
441412.71037663973691.28962336026311
451112.4926837833490-1.49268378334896
461312.72999461717440.270005382825651
47912.4317318167399-3.43173181673985
481111.9284819229621-0.928481922962108
491512.06015041785632.93984958214373
501112.3674234669803-1.36742346698027
511012.3226306434509-2.32263064345093
521412.58466659815721.41533340184277
531812.49008171318495.50991828681507
541413.53260125036000.467398749640019
551112.2506298604642-1.25062986046417
561212.6953141241069-0.695314124106936
571312.88663355052820.113366449471811
58913.1783911755526-4.17839117555261
591013.4818581163152-3.48185811631517
601513.26797136828871.73202863171132
612013.09737150629516.90262849370493
621212.9883727842134-0.98837278421337
631213.0559323774398-1.05593237743978
641413.05528320413700.944716795863015
651313.5455146042955-0.545514604295531
661112.6409616413161-1.64096164131609
671712.45800329028154.54199670971845
681213.0293594993813-1.02935949938127
691313.5662341687232-0.566234168723177
701412.98466912705921.01533087294085
711312.62860315227520.371396847724847
721513.06243755284991.93756244715014
731312.47221767929910.527782320700887
741012.4620088467348-2.46200884673482
751112.7471588451419-1.74715884514193
761912.83934110804206.16065889195796
771313.3710116370559-0.371011637055876
781712.90345000970984.09654999029021
791313.0332626046273-0.0332626046273221
80912.6551760303337-3.65517603033366
811112.7822922466790-1.78229224667898
821013.0792540120315-3.07925401203146
83912.9326249579323-3.93262495793233
841212.9224161253680-0.922416125368029
851212.9281669877917-0.928166987791667
861312.95659576582680.0434042341732008
871313.0188487675179-0.0188487675179238
881213.2258830661306-1.22588306613059
891512.42828161996342.57171838003657
902213.05853444760388.94146555239619
911312.69271205394290.307287946057096
921513.52154379640111.47845620359894
931313.2600627065894-0.260062706589362
941512.93847827156322.06152172843682
951012.9762137432643-2.97621374326426
961112.3334972868993-1.33349728689930
971612.42622627189503.57377372810502
981112.4341349335943-1.43413493359429
991113.0585344476038-2.05853444760381
1001012.8853325154462-2.88533251544617
1011012.7796901765149-2.77969017651494
1021613.27772778716562.72227221283441
1031212.9185130201220-0.91851302012198
1041113.0183020454224-2.01830204542235
1051612.7848943168433.21510568315699
1061912.82752934109676.17247065890333
1071112.9644019763189-1.96440197631890
1081612.73499980419283.26500019580718
1091513.14836810071771.85163189928232
1102413.674279624508810.3257203754912
1111413.83772513778960.162274862210421
1121512.97731582503672.02268417496331
1131113.3474937376310-2.34749373763103
1141513.14446499547161.85553500452836
1151213.9227530519768-1.92275305197681
1161013.7481449450535-3.74814494505351
1171413.51744173784540.482558262154581
1181313.6781827297549-0.678182729754897
119913.2041159269987-4.20411592699873
1201513.59335426365951.4066457363405
1211513.16472400341291.83527599658714
1221413.79043269530340.209567304696573
1231113.2936961197348-2.2936961197348
124813.7788203764499-5.77882037644989
1251113.5570249667241-2.55702496672409
1261113.4701492953593-2.47014929535927
127813.8293640624029-5.82936406240287
1281013.4779555058514-3.47795550585136
1291113.5407633724371-2.5407633724371
1301312.85670478410150.143295215898549
1311113.2949971548168-2.29499715481682
1322013.66582424071406.33417575928604
1331013.7034545727314-3.70345457273139
1341513.78122299852211.21877700147791
1351213.4272123718066-1.42721237180655
1361413.12244439596200.877555604038027
1372313.62698718202279.3730128179773
1381413.54206440751910.457935592480886
1391613.59065788508732.40934211491272
1401113.2405503636178-2.24055036361779
1411212.9733102685834-0.973310268583418
1421012.9376301449508-2.9376301449508
1431412.93523566567761.06476433432236
1441213.5173392866382-1.51733928663820
1451213.3370854569749-1.33708545697490
1461113.1037720368037-2.10377203680375
1471212.9156095454411-0.915609545441137
1481313.5058294189919-0.505829418991885
1491113.6379503275734-2.63795032757343
1501913.32157003287535.67842996712468
1511213.4500815927108-1.45008159271084
1521713.08881147759883.91118852240122
153912.6329564775144-3.63295647751441
1541213.4330656854374-1.43306568543741
1551913.32687662441065.67312337558939
1561813.67297858942684.32702141057317
1571513.09531665300891.90468334699114
1581413.32026899779330.679731002206694
1591112.7178900832935-1.71789008329345


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.9807716383459180.0384567233081650.0192283616540825
90.9876951778288520.02460964434229550.0123048221711478
100.9778016105866470.04439677882670530.0221983894133526
110.9635699942173620.07286001156527530.0364300057826377
120.9599843397747890.08003132045042230.0400156602252111
130.9545700212468070.09085995750638690.0454299787531934
140.9282524517589520.1434950964820950.0717475482410476
150.9356621344480910.1286757311038180.0643378655519088
160.9151309118196630.1697381763606730.0848690881803367
170.881399655300350.2372006893993000.118600344699650
180.8582284338356110.2835431323287780.141771566164389
190.8390598112450350.3218803775099290.160940188754965
200.8141401528493970.3717196943012070.185859847150603
210.8853711198333430.2292577603333130.114628880166657
220.8790513587899280.2418972824201450.120948641210072
230.8475878881764070.3048242236471860.152412111823593
240.8087671076349880.3824657847300240.191232892365012
250.7758530448392560.4482939103214870.224146955160744
260.7710377619932270.4579244760135460.228962238006773
270.7441055469952030.5117889060095940.255894453004797
280.7272512801673630.5454974396652740.272748719832637
290.6902397295644820.6195205408710360.309760270435518
300.6343534358742140.7312931282515720.365646564125786
310.679448959670990.641102080658020.32055104032901
320.6930707669845230.6138584660309530.306929233015477
330.6730043621164310.6539912757671380.326995637883569
340.6265872120021590.7468255759956820.373412787997841
350.5708137319116150.858372536176770.429186268088385
360.5800830531465920.8398338937068160.419916946853408
370.8267861086969570.3464277826060870.173213891303043
380.7914599186394520.4170801627210950.208540081360548
390.7631646649401060.4736706701197880.236835335059894
400.7433170491990770.5133659016018450.256682950800923
410.7318401769883170.5363196460233660.268159823011683
420.6988588651010520.6022822697978960.301141134898948
430.7371771127665460.5256457744669080.262822887233454
440.7023696000463570.5952607999072850.297630399953643
450.6676597189870260.6646805620259480.332340281012974
460.619604889662290.760790220675420.38039511033771
470.6241591265217690.7516817469564620.375840873478231
480.5831529493392760.8336941013214480.416847050660724
490.5703328558749940.8593342882500120.429667144125006
500.530025772100260.939948455799480.46997422789974
510.5184820201821860.9630359596356270.481517979817814
520.4777777140880260.9555554281760510.522222285911974
530.5687725113746050.862454977250790.431227488625395
540.5198159218780090.9603681562439820.480184078121991
550.4762570491930730.9525140983861470.523742950806926
560.4291544808916060.8583089617832120.570845519108394
570.3819696050850210.7639392101700420.618030394914979
580.4020609659036140.8041219318072280.597939034096386
590.3947948139025360.7895896278050710.605205186097464
600.3792359081131090.7584718162262180.620764091886891
610.5672474077670140.8655051844659720.432752592232986
620.5241341308126820.9517317383746360.475865869187318
630.4815029330962190.9630058661924370.518497066903781
640.4374482691155260.8748965382310520.562551730884474
650.3930252376919850.786050475383970.606974762308015
660.3582296756746720.7164593513493440.641770324325328
670.4063858407895080.8127716815790150.593614159210492
680.3668276224861740.7336552449723490.633172377513826
690.3259031839900470.6518063679800930.674096816009953
700.2878654901090790.5757309802181590.71213450989092
710.2494724519537200.4989449039074410.75052754804628
720.2246873857564750.4493747715129500.775312614243525
730.1917934314762960.3835868629525930.808206568523704
740.1797489423967540.3594978847935090.820251057603246
750.1597421070433920.3194842140867840.840257892956608
760.2465074287461440.4930148574922880.753492571253856
770.2130075854384190.4260151708768380.786992414561581
780.2312021944911930.4624043889823860.768797805508807
790.1981860953099000.3963721906198010.8018139046901
800.2110563808012440.4221127616024880.788943619198756
810.1905084304535570.3810168609071140.809491569546443
820.1920851887905080.3841703775810170.807914811209492
830.2137014145578440.4274028291156880.786298585442156
840.1861521737129020.3723043474258030.813847826287098
850.1598148332348880.3196296664697760.840185166765112
860.1356540477582870.2713080955165740.864345952241713
870.1127559338048640.2255118676097270.887244066195136
880.09649273969805970.1929854793961190.90350726030194
890.08864493804555450.1772898760911090.911355061954445
900.275190743214180.550381486428360.72480925678582
910.2375852288597860.4751704577195720.762414771140214
920.2082641119203290.4165282238406580.791735888079671
930.1766616229648730.3533232459297450.823338377035127
940.1572889635776920.3145779271553830.842711036422308
950.1544766001748860.3089532003497730.845523399825114
960.1349953016279340.2699906032558690.865004698372066
970.1395561212244310.2791122424488620.860443878775569
980.1204140156380860.2408280312761720.879585984361914
990.1096297052819640.2192594105639280.890370294718036
1000.111158658138070.222317316276140.88884134186193
1010.1157947648702860.2315895297405720.884205235129714
1020.1020180433639880.2040360867279750.897981956636013
1030.09556489326963850.1911297865392770.904435106730362
1040.1074628010119490.2149256020238980.892537198988051
1050.09413347971980850.1882669594396170.905866520280192
1060.1281709350623210.2563418701246410.87182906493768
1070.1274085407518610.2548170815037210.87259145924814
1080.1108365602335720.2216731204671440.889163439766428
1090.0957010341922650.191402068384530.904298965807735
1100.4169827505309480.8339655010618960.583017249469052
1110.3694246301781370.7388492603562750.630575369821863
1120.3407676554119760.6815353108239530.659232344588024
1130.3184310281573040.6368620563146070.681568971842696
1140.2834845215059190.5669690430118390.71651547849408
1150.2558027075852520.5116054151705050.744197292414748
1160.2844719433736890.5689438867473790.71552805662631
1170.2414561597015190.4829123194030380.758543840298481
1180.2041497160248030.4082994320496060.795850283975197
1190.2321146986831290.4642293973662580.767885301316871
1200.2052185562413900.4104371124827810.79478144375861
1210.2103392721451490.4206785442902980.78966072785485
1220.1727325644310270.3454651288620540.827267435568973
1230.1545213003184960.3090426006369920.845478699681504
1240.2148148670895280.4296297341790560.785185132910472
1250.192699444913650.38539888982730.80730055508635
1260.1923518751613530.3847037503227070.807648124838647
1270.3500408142555190.7000816285110380.649959185744481
1280.3705989715922700.7411979431845410.62940102840773
1290.3968293662848670.7936587325697330.603170633715133
1300.3783597175768740.7567194351537470.621640282423126
1310.3515852092433460.7031704184866930.648414790756654
1320.4391215502277450.878243100455490.560878449772255
1330.563410023230290.8731799535394210.436589976769711
1340.5034837380485210.9930325239029590.496516261951479
1350.4684680292223880.9369360584447760.531531970777612
1360.4026585868725260.8053171737450520.597341413127474
1370.768458119523340.463083760953320.23154188047666
1380.7097308434636060.5805383130727870.290269156536394
1390.6531012998362260.6937974003275470.346898700163773
1400.6100718837923120.7798562324153760.389928116207688
1410.5463084654745310.9073830690509380.453691534525469
1420.4920270839530540.9840541679061080.507972916046946
1430.4181325241619460.8362650483238910.581867475838054
1440.3372767735418770.6745535470837530.662723226458123
1450.3303527112221660.6607054224443320.669647288777834
1460.2483972161023470.4967944322046930.751602783897653
1470.1750156400064780.3500312800129550.824984359993522
1480.1207472820106720.2414945640213450.879252717989327
1490.2253276506243100.4506553012486190.77467234937569
1500.2508217649231870.5016435298463740.749178235076813
1510.2570209650744540.5140419301489070.742979034925546


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level30.0208333333333333OK
10% type I error level60.0416666666666667OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/10vekg1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/10vekg1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/1ovnm1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/1ovnm1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/2ovnm1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/2ovnm1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/3z5mp1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/3z5mp1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/4z5mp1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/4z5mp1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/5z5mp1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/5z5mp1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/6re3a1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/6re3a1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/7re3a1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/7re3a1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/8knlv1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/8knlv1290521781.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/9knlv1290521781.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905217519monfm5oc1a3kfo/9knlv1290521781.ps (open in new window)


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