Home » date » 2010 » Dec » 14 »

*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 18:33:47 +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/t12923516463zt49k1lrv4oacb.htm/, Retrieved Tue, 14 Dec 2010 19:34:06 +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/t12923516463zt49k1lrv4oacb.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 «
6 4 15 10 4 4 1 11 9 9 19 7 7 1 9 9 12 15 4 4 1 14 6 16 12 5 4 1 12 8 16 14 5 6 1 18 11 15 13 4 4 1 15 10 16 11 4 5 1 12 13 13 18 5 5 1 15 10 18 12 5 4 1 13 6 17 15 3 4 1 10 8 14 15 7 7 1 13 5 13 9 4 5 1 17 9 15 11 6 5 1 15 11 15 16 5 4 1 13 11 13 17 7 7 1 17 9 13 11 5 5 1 21 7 16 13 5 5 1 12 6 14 9 4 4 1 15 6 18 11 4 4 1 16 10 16 12 7 7 1 11 4 17 13 5 8 1 9 9 15 13 2 2 1 14 10 11 13 4 3 1 14 13 11 14 5 7 1 12 8 15 9 4 5 1 15 10 15 9 4 4 1 11 5 12 15 4 4 1 11 8 17 10 4 4 1 13 9 14 15 5 6 1 12 7 17 13 4 6 1 24 20 10 24 4 4 1 11 8 15 13 4 4 1 12 7 7 22 2 4 1 13 6 9 9 5 5 1 11 10 14 12 5 7 1 14 11 11 16 7 8 1 16 12 15 10 7 7 1 12 7 16 13 4 4 1 21 12 17 11 4 4 1 6 6 15 13 4 2 1 14 9 15 10 2 4 1 16 5 16 11 5 4 1 18 11 16 9 4 4 1 13 10 12 14 2 4 1 11 7 15 11 4 5 1 16 8 17 10 4 5 1 11 9 19 11 5 5 1 11 8 15 12 1 1 1 20 13 14 14 4 5 1 10 7 16 21 5 7 1 12 7 15 13 5 7 1 14 9 12 12 7 7 1 12 9 18 12 4 4 1 12 8 13 11 4 4 1 12 7 14 14 4 4 1 13 10 15 12 2 2 1 12 7 11 12 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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Ha[t] = + 20.6116433791875 + 0.0922363853607814PE[t] -0.121308271780651PC[t] -0.406200063771142De[t] -0.153397692032067DM[t] + 0.108700153383175DV[t] -0.98972587899186Geslacht[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)20.61164337918751.27119716.214400
PE0.09223638536078140.0590391.56230.1205590.060279
PC-0.1213082717806510.075033-1.61670.1082690.054135
De-0.4062000637711420.051139-7.94300
DM-0.1533976920320670.176284-0.87020.3857510.192876
DV0.1087001533831750.1452220.74850.4554540.227727
Geslacht-0.989725878991860.352609-2.80690.0057440.002872


Multiple Linear Regression - Regression Statistics
Multiple R0.600441188248882
R-squared0.360529620545729
Adjusted R-squared0.332108714792206
F-TEST (value)12.685367020755
F-TEST (DF numerator)6
F-TEST (DF denominator)135
p-value2.54611887129386e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.93658428066618
Sum Squared Residuals506.298421276653


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11515.4493119329308-0.449311932930813
2911.5140593109445-2.51405931094449
31213.0884794112542-1.08847941125417
41614.97878865268141.02121134731861
51613.95669951762262.04330048237741
61514.48839046348220.511609536517817
71615.25408986010590.745910139894052
81311.61665775025161.38334224974841
91814.58579195091963.41420804908043
101713.97474746007133.02525253992869
111413.16793145244890.832068547551073
121316.4885585758299-3.48855857582992
131515.2530755185440-0.253075518544029
141512.83968342405432.16031657594565
151312.26831566564700.731684334352964
161315.4064732105761-2.40647321057609
171615.20563516803820.794364831961761
181416.1663137653053-2.16631376530531
191815.63062279384542.36937720615462
201614.69733341236571.30266658763426
211714.97329658992192.02670341007810
221513.99027461609421.00972538390576
231114.1320530404365-3.13205304043653
241113.6433310828241-2.64333108282407
251516.0323973751272-1.03239737512719
261515.9577898342651-0.957789834265056
271213.7581852690983-1.75818526909834
281715.42526077261211.57473922738791
291413.52142756743160.478572432568422
301714.63760554520642.36239445479355
31109.481833628138460.51816637186154
321514.20666058129870.793339418701334
33711.0712000485640-4.07120004856396
34916.2138526120172-7.2138526120172
351414.5429468696260-0.542946869625965
361112.8754522681621-1.87545226816213
371515.2671169963467-0.26711699634672
381614.42020523844011.5797947615599
391715.45619147532621.54380852467384
401513.77069489128971.22930510871029
411515.8874570409779-0.887457040977917
421615.69076975895470.309230241045258
431616.1131907185667-0.113190718566750
441214.0491121287519-2.04911212875192
451515.2490691340048-0.249069134004775
461715.99514285279921.00485714720083
471914.85305489841144.14694510158859
481514.74695326101650.253046738983518
491414.1327467802545-0.132746780254479
501611.15883472566694.84116527433314
511514.59290800655760.407091993442444
521214.6341689134248-2.63416891342483
531814.58378875864993.41621124135006
541315.1112970942017-2.11129709420173
551414.0140051746690-0.0140051746689567
561514.64411194952790.355888050472148
571114.6730076101792-3.67300761017917
581514.95589620990000.0441037900999627
591413.42835306627740.571646933722574
601615.11129709420170.88870290579827
611411.73314228834332.26685771165673
621816.13207677680881.86792322319115
631415.2220004398545-1.22200043985453
641312.75362648233210.246373517667913
651415.1112970942017-1.11129709420173
661715.77355993572501.22644006427498
671213.8017495009573-1.80174950095731
681614.06740286327541.93259713672461
691515.2122336295201-0.212233629520055
701615.57005673078590.429943269214065
711414.2439151036267-0.243915103626682
721715.69019992609031.30980007390967
731414.8983222699247-0.89832226992471
741613.57873322447792.42126677552206
751214.9057906969930-2.90579069699302
761313.3751777808306-0.375177780830625
771916.00782870075912.99217129924090
781112.7663330969357-1.76633309693566
791513.98926027453231.01073972546768
801213.2938414324875-1.29384143248746
811414.4961540815470-0.496154081547034
821113.4459819107761-2.44598191077607
831514.41202260253200.587977397468048
841212.4317230401951-0.431723040195107
851414.0430770610888-0.0430770610888261
861316.0105922792596-3.01059227925965
87910.3053490308667-1.30534903086673
881212.6945455890623-0.694545589062288
891514.63629520659560.363704793404361
901715.47776722055781.52223277944221
911412.90297102389641.09702897610355
92119.186009143284891.81399085671511
931314.0759370645615-1.07593706456151
941014.4708847198847-4.47088471988472
951214.8217823188791-2.82178231887912
961513.68328173118731.31671826881269
971314.4355348936202-1.43553489362023
981313.8376682739271-0.837668273927086
991213.0242792956771-1.02427929567710
100910.1346494550189-1.13464945501890
1011616.2362062656749-0.236206265674917
1021714.20636458424982.79363541575023
1031314.4564241441320-1.45642414413195
1041012.4626783476043-2.46267834760426
1051313.8260744970915-0.826074497091531
1061615.36106065703500.638939342964982
1071513.38377862852971.61622137147028
1081614.84991759329951.15008240670048
1091113.6138392924018-2.61383929240178
1101514.11622988736470.883770112635278
1111714.52176806111102.47823193888896
1121412.99478839141391.00521160858607
1131815.82214408763282.17785591236718
1141413.15060829355890.849391706441079
1151414.2683037192404-0.268303719240363
1161214.0293348298491-2.02933482984909
1171113.2750784751465-2.27507847514654
1181413.40885048934920.591149510650755
1191612.45941794159123.54058205840881
1201713.92063467646593.07936532353409
1211413.36731486050730.632685139492674
1221413.30917108766760.690828912332412
1231213.5308983807172-1.53089838071717
1241213.3775006886851-1.3775006886851
1251111.5238048462047-0.523804846204728
1261513.23824297066181.76175702933818
1271412.65533375423401.34466624576603
1281011.9193014876419-1.91930148764192
1291313.9370984444883-0.937098444488308
1301514.55182243929970.448177560700292
1311513.74528115365201.25471884634803
1321614.19291835005891.80708164994107
133810.3685135298076-2.36851352980764
134910.9952821690910-1.99528216909102
1351514.31073775134970.689262248650278
1361112.9539987410982-1.95399874109819
1371515.1765878863135-0.176587886313455
1381614.66536709301551.33463290698449
1391613.72295854373502.27704145626497
1401512.87105782941362.12894217058642
1411314.4708847198847-1.47088471988472
1421515.0654654427106-0.0654654427105774


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.8199931409753460.3600137180493070.180006859024654
110.7646859437932880.4706281124134250.235314056206712
120.9151893726843170.1696212546313650.0848106273156826
130.8697823408785110.2604353182429780.130217659121489
140.808884697068280.3822306058634390.191115302931719
150.7392048289611770.5215903420776460.260795171038823
160.7783045201201060.4433909597597870.221695479879894
170.7036901445305460.5926197109389080.296309855469454
180.6760506168074820.6478987663850350.323949383192518
190.6791179316579990.6417641366840020.320882068342001
200.6855988012210230.6288023975579550.314401198778977
210.716337083967970.567325832064060.28366291603203
220.6494797030689810.7010405938620380.350520296931019
230.7725368115809570.4549263768380870.227463188419043
240.8021562428717970.3956875142564050.197843757128203
250.7512759388838510.4974481222322980.248724061116149
260.6946046746165330.6107906507669340.305395325383467
270.7401888797087880.5196222405824230.259811120291212
280.7448874996984410.5102250006031170.255112500301559
290.6897012247378490.6205975505243030.310298775262151
300.6937146042499840.6125707915000320.306285395750016
310.653887994368740.692224011262520.34611200563126
320.601179687624290.7976406247514210.398820312375710
330.7963501999181580.4072996001636830.203649800081842
340.9927877777728550.01442444445429030.00721222222714517
350.9895061999920830.02098760001583420.0104938000079171
360.9887616089492560.02247678210148890.0112383910507445
370.983885924044540.03222815191092160.0161140759554608
380.981594571738550.03681085652290140.0184054282614507
390.9780160871318570.04396782573628550.0219839128681428
400.9724414932291390.05511701354172240.0275585067708612
410.9639040204534230.0721919590931540.036095979546577
420.9516782723547170.09664345529056610.0483217276452831
430.936379513790980.1272409724180390.0636204862090193
440.933076111930440.1338477761391210.0669238880695607
450.9145048689336920.1709902621326150.0854951310663077
460.8992645467050530.2014709065898930.100735453294947
470.9551810959416720.08963780811665540.0448189040583277
480.94137648869780.1172470226043990.0586235113021997
490.9243121434286590.1513757131426820.0756878565713411
500.9807086648863070.0385826702273860.019291335113693
510.974206551312520.05158689737495990.0257934486874799
520.97879114610420.0424177077915990.0212088538957995
530.9886514261214470.02269714775710620.0113485738785531
540.9889765281297130.02204694374057300.0110234718702865
550.9847348087963930.03053038240721320.0152651912036066
560.9793143780967490.04137124380650280.0206856219032514
570.9907222415647860.01855551687042750.00927775843521373
580.9870502356539560.02589952869208770.0129497643460439
590.9827069319367720.03458613612645640.0172930680632282
600.977922988539440.04415402292112120.0220770114605606
610.9805609368093890.03887812638122260.0194390631906113
620.9802313329717760.03953733405644870.0197686670282243
630.9757545916786430.04849081664271320.0242454083213566
640.9680757367419430.06384852651611320.0319242632580566
650.9611752060500350.07764958789993030.0388247939499652
660.9543089993646960.09138200127060850.0456910006353043
670.9485888790155040.1028222419689920.051411120984496
680.9512514598114760.09749708037704820.0487485401885241
690.9371717071558410.1256565856883170.0628282928441587
700.9220883812514040.1558232374971920.0779116187485962
710.9021109126412160.1957781747175670.0978890873587837
720.8950218220356290.2099563559287420.104978177964371
730.876279654440010.2474406911199800.123720345559990
740.8997469552004680.2005060895990630.100253044799532
750.9159194230468530.1681611539062940.0840805769531472
760.8963652769081670.2072694461836660.103634723091833
770.9307766867854530.1384466264290940.0692233132145468
780.923777719874210.1524445602515800.0762222801257899
790.9158606642072750.168278671585450.084139335792725
800.9008730123411820.1982539753176370.0991269876588184
810.8784930794091120.2430138411817750.121506920590888
820.8796510671451730.2406978657096540.120348932854827
830.8630358967765790.2739282064468420.136964103223421
840.845288498875920.3094230022481610.154711501124081
850.8482937563307750.3034124873384510.151706243669225
860.8385087144260380.3229825711479230.161491285573962
870.8056073051079520.3887853897840970.194392694892048
880.7756164102442040.4487671795115930.224383589755796
890.742278969811480.515442060377040.25772103018852
900.7262351760465290.5475296479069420.273764823953471
910.695966191879010.6080676162419790.304033808120989
920.7145800939729350.5708398120541310.285419906027065
930.6947877499643850.610424500071230.305212250035615
940.867329423468010.2653411530639790.132670576531989
950.9120917641760520.1758164716478950.0879082358239476
960.9034196061461110.1931607877077780.096580393853889
970.9009446105488360.1981107789023270.0990553894511636
980.8753003796136850.2493992407726310.124699620386315
990.8505992838902850.298801432219430.149400716109715
1000.8220685182749650.3558629634500700.177931481725035
1010.8068499223197940.3863001553604120.193150077680206
1020.8462951056667980.3074097886664040.153704894333202
1030.8507777130292560.2984445739414890.149222286970744
1040.8622966229844550.275406754031090.137703377015545
1050.8387359688509630.3225280622980730.161264031149037
1060.8082562931330710.3834874137338580.191743706866929
1070.7921127889140920.4157744221718160.207887211085908
1080.756684297538110.486631404923780.24331570246189
1090.7955235529518210.4089528940963570.204476447048179
1100.7506485267637730.4987029464724540.249351473236227
1110.7448445193008960.5103109613982090.255155480699104
1120.7059450742052780.5881098515894430.294054925794722
1130.674429619633160.6511407607336810.325570380366840
1140.6236314438395380.7527371123209240.376368556160462
1150.5692298556115320.8615402887769350.430770144388468
1160.6085372698951570.7829254602096870.391462730104844
1170.638967730440020.722064539119960.36103226955998
1180.5727370200528520.8545259598942960.427262979947148
1190.7657876931526450.4684246136947110.234212306847355
1200.851026774688030.297946450623940.14897322531197
1210.8032250210319930.3935499579360130.196774978968007
1220.7505935398124350.4988129203751290.249406460187564
1230.7269200967710440.5461598064579110.273079903228956
1240.6941569485503530.6116861028992940.305843051449647
1250.615691966501060.768616066997880.38430803349894
1260.6115592847939580.7768814304120840.388440715206042
1270.5747942393091410.8504115213817170.425205760690859
1280.5104206164622030.9791587670755940.489579383537797
1290.4597975290624670.9195950581249350.540202470937533
1300.3424218815184170.6848437630368330.657578118481583
1310.2413423433408330.4826846866816660.758657656659167
1320.1596632480340300.3193264960680610.84033675196597


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level190.154471544715447NOK
10% type I error level280.227642276422764NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/106knq1292351616.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/106knq1292351616.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/4ss7z1292351616.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/4ss7z1292351616.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/5ss7z1292351616.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/5ss7z1292351616.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/63k621292351616.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/63k621292351616.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/96knq1292351616.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923516463zt49k1lrv4oacb/96knq1292351616.ps (open in new window)


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